How do I get the selected object's distance from the camera?
To get the distance between two objects in the scene :


setup a driver with the following settings 


type : Scripted Expression
expr : var

add new variable 'var' of type Distance   
set the targets to the objects of interest
Now the driver value is the distance between these two object