Measurements of longitudinal and transverse momentum distributions for neutral pions in the forward-rapidity region with the LHCf detector