You can't specify a port number for a ping command, ping
uses ICMP protocol (IP protocol number 1) which does not have a concept of ports to start with. Moreover, pinging you server will not tell you if the service in question is available or not.
For instance, a firewall between you and the sever can block any TCP connection yet allow pinging (you'll get false positive in this case) or vice versa (you'll get false negative in this case).
That's why many application protocols implement some king of "check health command" which you can use to check if the service (rather than a server) is available or not.
I suggest you try to connect to the service and if connection fails then you can safely assume your service is not available.