Search for long-lived particles produced in association with a Z boson in proton-proton collisions at $\sqrt{s}$ = 13 TeV