See paper for full list of authors - submitted to Phys. Rev. LettWe present a search for the standard model (SM) Higgs boson produced in association with a Z boson in 9.7 fb-1 of ppbar collisions collected with the D0 detector at the Fermilab Tevatron Collider at sqrt(s) = 1.96 TeV. Selected events contain one reconstructed Z-> e+e- or Z->mu+mu- candidate and at least two jets, including at least one jet from a b quark. Upper limits at the 95% C.L. on the ZH production cross section times branching ratio for H->bbbar are set for Higgs boson masses 90 <= M_H <= 150 GeV. The observed (expected) limit for M_H = 125 GeV is 7.1 (5.1) times the SM cross section. To validate the search procedure, we also measure the cross section for ZZ production...