To add to Amit's answer, an upgrade on the same server that has the old version of AAD Connect is not recommended. If you refer to the Swing Migration section of the documentation, it is recommended to set up a new server with Windows 2019 and install the latest version of AAD Connect in staging mode. When the staging server syncs once or twice and everything looks good, then make that one active and set the old server in staging mode.
If you don't want to go the route of rebuilding the server, you can try the steps in this article to troubleshoot not being able to uninstall the program. https://support.microsoft.com/en-us/topic/fix-problems-that-block-programs-from-being-installed-or-removed-cca7d1b6-65a9-3d98-426b-e9f927e1eb4d
You can also get hints by collecting the Event Application Logs, and you can validate if the Connector is missing by running:
Get-ADSyncConnector -Identifier "b891884f-051e-4a83-95af-2544101c9083”
If the troubleshooting steps do not work, you may to rebuild the server since the Windows registry could be damaged/corrupted.
Let me know if this helps and if you still run into any issues.
If the information helped you, please Accept the answer. This will help us as well as others in the community who may be researching similar questions. Otherwise let me know if you run into any issues.