The distance is theoretically from the first nodal point, which is inside the lense. somewhere, depending on the design.
However, I can't fathom, what on earth you want to use this for. When testing focusing to infinity, will you walk up to the moon and measure the distance?
This is a totally irrelevant measurement. The markings on the barrel are only approximate, for orientation. Furthermore, the "camera's sensor" has no idea of the focusing distance. Some cameras report this distance, but they receive it from the lens.