Distance spectrum of graph compositions