Thank you for posting this in Microsoft Q&A.
Looking at the error looks like AD connect is installed and configured correctly. But AD connect health registration had failed.
Looks like due to some network issue AD connect health agent registration might had failed.
You can check below article to troubleshoot further on the AD connect health registration,
In the above article make sure you have all the prerequisites met and also make sure network prerequisites are met.
Apart from this there are some tests that we can run to confirm if prerequisites are met.
Let me know if you have any further questions.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.