Based on subst.doc, I suggest using COOR MIND and the variable ?MIND
Another option is the QUICK command (miscom.doc); with two atoms, it prints a distance, and stores it in ?DIST (not @DIST as the .doc file suggests).
With the exception of a single atom in both selections, COOR DIST often returns multiple distances, so isn't always sensible to arbitrarily stuff a value into a scalar variable.