How to implement closestPointToGeometry in tree-mesh-bvh for multi-layer object hierarchy

Hello, comunity and I need your help, so I have two of these kinds of structures in my scene

Groupe
Groupe
Mesh

I am wondering how to make calculations with the help of closestPointToGeometry so I can get Mesh Distances

Advanced Thank you !