Why does my voyager, when shifting gears make a loud clunk noise. on 1996 Plymouth Voyager

When I shift between front and rear direction sometimes it makes a loud clunk noise and does not go in the direction I shifted to. One time I put it in forward and it clunked & when I stepped on gas it went backward instead, almost hitting car behind me but was able to brake in time. Is this the transmission? How serious is this. It usually happens more often if I am on a hill or slight incline.

Asked by for the 1996 Plymouth Voyager