More details about computers network are needed. This kind of error could be caused by entering the wrong IP or connection port number.
Routers supporting UPnP or NAT-PMP are configured automatically to pass connections to NoMachine. All required information is displayed at initial screen (Welcome to NoMachine) when you launch the NoMachine GUI on the remote machine you want connect to.
Please be sure to use the correct hostname/public IP and port when you connect.
Please note also that routers not supporting UPnP or NAT-PMP and Firewalls have to be configured manually to pass traffic to port 4000 (NX protocol), 22 (SSH protocol on Linux/MacOSX) or (4022) (SSH protocol on Windows).
Article: https://www.nomachine.com/AR11L00827 can be helpful.