Search for long-lived particles decaying to a pair of muons in proton-proton collisions at $\sqrt{s}$ = 13 TeV