Unfortunately the computer name and host name can get out of sync. Open a terminal window and use
sudo hostname <new hostname>
to change the hostname. Once executed, it changes the system configuration, so the new hostname will be there when you reboot.
Also, be aware that some DHCP servers will assign a hostname. Depending on the network you attach to and the DHCP server configuration you may have to work with the network administrator if you need to use a different hostname. You don't have to worry about this for most consumer grade routers.