I believe this is the right file https://github.com/ExpressionEngine/ExpressionEngine/releases/tag/3.5.17
If you're upgrading a site from an earlier EE version, remember to follow the instruction under the heading "If you're installing from the repository". You may already have an existing system/user/config/config.php file with variable assignations that ...
Hard to tell from your question what actually is going on, but here is a suggestion for a way forward:
Download a clean copy of EE 5.4
Create a clean / new install of EE 5.4 on some test system
Copy the system / index files created in the new install
Update the copied system / index files with relevant information from your existing system / index files
You have a few options.
If it's just extensions, you can use this configuration override to disable all extensions:
$config['allow_extensions'] = 'n';
Add that line to the end of your config.php file. That might allow you access to your Control Panel to move forward with removing add-ons.
Another option is to (backup these tables first) truncate your ...