@DM Kosala Randika Paranathala Thank you for reaching out to us, would recommend to follow the steps/requirements mentioned in this blog - https://jeffreyappel.nl/install-the-new-unified-microsoft-defender-for-endpoint-agent-on-server-2012r2-and-2016/#:~:text=Server%202016%20requirements for onboarding server 2016 to defender for endpoint.
If this doesnt help, let me know we can connect offline and troubleshoot further on the same.