Measurements of differential cross sections for J/psi production in p + Pb collisions at root S-NN= 5.02 TeV at the CERN Large Hadron Collider with the ATLAS detector are presented. The data set used corresponds to an integrated luminosity of 28.1 nb(-1). The J/psi mesons are reconstructed in the dimuon decay channel over the transverse momentum range 8 < PT < 30 GeV and over the center-of-mass rapidity range -2.87 < y* < 1.94. Prompt J/psi are separated from J/psi resulting from b-hadron decays through an analysis of the distance between the J/psi decay vertex and the event primary vertex. The differential cross section for production of nonprompt J/psi is compared to a FONLL calculation that does not include nuclear effects. Forward-backward production ratios are presented and compared to theoretical predictions. These results complement previously published results by covering a region of higher transverse momentum and more central rapidity. They thus constrain the kinematic dependence of nuclear modifications of charmonium and b-quark production in p + Pb collisions.