Measurement of differential cross sections for Z boson pair production in association with jets at s=8 and 13 TeV