Could be anything from a stuck shift valve to a tossed governor spring. Some more detailed information would help.
Was the transmission rebuilt? If so, did it ever work right after the rebuild? If not, describe what happened when it stopped working. Were the shifts there one second/gone the next?