serverConnection.getping()
Though on your own server it would be a very low number
If you want it to show like the pings that show in JoinServerGUI, I don't think you can, because I'm pretty sure thats the ping for the specific player that is querying at that time. You can't really have one ping that will be true for all clients, for example one could be your neighbor while another could the world and there'd be a large ping difference.
You could show a specific client's ping with
client.getping()