Study of jet quenching with Z+jet correlations in PbPb and pp collisions at sqrt(s[NN]) = 5.02 TeV