In your service definition, specify the check_command as follows:
check_command check_ssh!-p XXXX
Where XXXX is the port number you want to check. "-p" is fairly common across nagios plugins for specifying a port number over the default. You may need to check where "check_ssh" is defined in your nagios config to make sure it's not explicitly setting port 22 or not allowing additional parameters such as -p..