In your case, it sounds like something in the SQL installation for the ADSync database may have gone wrong. It can happen if you do not have the recent .NET framework installed, in which case you may need to run the .NET framework repair tool. Another possibility is that the installation file of SQL server may be corrupted.
Otherwise, this can also happen for one of several reasons:
- Most commonly, this error occurs due to some permission or .NET framework related issues on the underlying OS. In that case, verify that the prerequisites in this list are met.
- This can happen if the machine is unable to connect to the locally available domain controller. Please verify that the connection is working.
- There may be a firewall rule causing this error.
(*Note: This can also happen if you are not using the latest version of Azure AD Connect and need to update, but you already mentioned that you are using the latest version.)