We present a measurement of the production cross section for ZW and ZZ boson pairs in final states with a pair of charged leptons, from the decay of a Z boson, and at least two jets, from the decay of a W or Z boson, using the full sample of proton-antiproton collisions recorded with the CDF II detector at the Tevatron, corresponding to 8.9 fb−1 of integrated luminosity. We increase the sensitivity to vector-boson decays into pairs of quarks using a neural-network discriminant that exploits the differences between the spatial spread of energy depositions and charged-particle momenta contained within the jet of particles originating from quarks and gluons. Additionally, we employ new jet energy corrections to Monte Carlo simulations that account for differences in the observed energy scales for quark and gluon jets. The number of signal events is extracted through a simultaneous fit to the dijet mass spectrum in three classes of events: events likely to contain jets with a heavy-quark decay, events likely to contain jets originating from light quarks, and events that fail these identification criteria. We determine the production cross section to be σZW+ZZ=2.5+2.0−1.0 pb (<6.1 pb at the 95% confidence level), consistent with the standard model prediction of 5.1 pb.