For the server:
Azure AD Connect must be installed on a domain-joined Windows Server 2016 or later - note that Windows Server 2022 is not yet supported.
For the network placement:
Azure AD Connect requires network connectivity to the root domain of all configured forest
From: Prerequisites for Azure AD Connect
As long as you can connect to the DCs of all the forest in the scope of synchronization from that server, you are good to go.