If it's a small amount of front to rear movement, then Yes, it's normal.
If it's moving very erratically, then get it checked out. Otherwise, you're fine.
A cab driver once told me he actually traded his '02 4Runner back in just days after he bought it b/c he thought it was not supposed to do this. What a moron. It's probably better he doesn't own a 4Runner now anyway...
EDIT:
Take this for what it's worth, but here's what another member said about this issue in another post:
Originally posted by Makakio
My understanding
of this issue (it's normal, BTW to see the auto-trans gear selector moving forward and back not only under acceleration but also braking and bumpy roads) is due to the design of the shift linkage and hte concept that the 4Runner is a body-on-frame (read: truck-based) design, versus a unitbody design. With a body-on-frame, the drivetrain is all suspended - meaning it flexes - under the frame and the frame/body union is inflexible (relaitvely - there are super-hard rubber mount bushings between frame and body). With unit-body construction, the powertrain is mounted directly to the body, which in it's entirety acts like a frame. Body-on-frame is a more rugged suited to offroad, towing, long suspension travel, etc and unitbody drives and handles better (it's dynamically "tighter"). So the movement of the shifters, which are in a 4Runner are directly linked to the tranny, is simply a view into the forces that your drivetrain and suspension are incurring as you motor along.
Again, that's as understand it. Do correct me if I'm off.