The transverse momentum (pT) distribution for inclusive neutral pions in the very forward rapidity region has been measured, with the Large Hadron Collider forward detector (LHCf), in proton--lead collisions at nucleon-nucleon center-of-mass energies of sNN=5.02TeV at the LHC. The pT spectra obtained in the rapidity range −11.0<ylab<−8.9 and 0<pT<0.6GeV (in the detector reference frame) show a strong suppression of the production of neutral pions after taking into account ultra-peripheral collisions. This leads to a nuclear modification factor value, relative to the interpolated pT spectra in proton-proton collisions at s=5.02TeV, of about 0.1--0.4. This value is compared with the predictions of several hadronic interaction Monte Carlo simulations.