CalculateTreeDistance function

Wrapper for tree distance calculations