sounds like it doesn't have enough oil or it's leaking some where.
possibly clogged oil filter, cracked line in the transmission, foaming of the transmission fluid, leaking valve body, miss-aligned shift cable, stuck pressure regulator, or bad clutch packs.
could be anything.
i would start with dropping the oil pan on the transmission and draining all the oil,
then replacing the transmission oil filter, and putting fresh oil.(usually 5 qts. but don't over fill it)