+1 on 2002cg3coupe's post. It might be time or past due on the transmission service.
How long has that issue been happening? I don't know how you drive, but I've seen people go from R to D or D to R while the car's still moving, and pushing the gas before the gear properly engages. I'd recommend fully stopping, moving it to neutral and waiting for a couple seconds, then move to reverse and wait to feel it engage before touching the throttle. I always did that and kept the revs low on my 96 Explorer which is known for tranny failures, and it never let me down.