Calculate Distance between 2 colliders

I’m trying, unsuccessfully, to find a way to easily calculate the distance between two objects’s collider.
In my case I’m trying between two box collider,

			BoxCollider	boxColStart = start.GetComponent<BoxCollider>();
			Vector3 centerBoxStart = boxColStart.ClosestPointOnBounds(end.transform.position);

			BoxCollider	boxColEnd = end.GetComponent<BoxCollider>();
			Vector3 centerBoxEnd =  boxColEnd.ClosestPointOnBounds(start.transform.position);
		
			lineRenderer.SetPosition (0,  centerBoxStart);
			lineRenderer.SetPosition (1,  centerBoxEnd);

the code I’m using is wrong and this sketch is the proof:

every suggestion is very welcome

Thanks

Davide

If your collider is set on your mesh you can find the distance between meshes using vertices and etc.
see link below for more (first one is for 2d meshes and the next is for 3d )

//

look in collider.bounds.center instead it gives a vector3