Calculates distances from placed OTUs to nodes along the tree