calculate_dist_junctions function

collect the full distribution of junctions in the population