how to check the distance between ray hit point and any game object in the game.

i am new to ray casting so any help with the code will be appreciated.
in the screenshot given below … when i click on any chair the character goes to that chair, and i want to measure the distance between the hit point and the character moving towards the hit point.

70898-sss.png

Vector3.Distance(player.position, chair.position);