The production of charged hadrons within jets recoiling against a Z boson is measured in proton-proton collision data at √s=8 TeV recorded by the LHCb experiment. The charged-hadron structure of the jet is studied longitudinally and transverse to the jet axis for jets with transverse momentum pT>20 GeV and in the pseudorapidity range 2.5<η<4. These are the first measurements of jet hadronization at these forward rapidities and also the first where the jet is produced in association with a Z boson. In contrast to previous hadronization measurements at the Large Hadron Collider, which are dominated by gluon jets, these measurements probe predominantly light-quark jets which are found to be more longitudinally and transversely collimated with respect to the jet axis when compared to the previous gluon dominated measurements. Therefore, these results provide valuable information on differences between quarks and gluons regarding nonperturbative hadronization dynamics.