first of all check the ATF, as I already said to Bruno. General rule: if it does not smell burnt, if it is not completely dirty and a lot of metal in the pan, I would try a valve body rebuild. That is done in a few hours usually. Much smoother shifting, provided of course there is no damage to the clutches.
I am an amateur repairer, we have done abt 10 4HP22-24 so far. So maybe a pro chimes in with better comments.
But from this little bit of experience I can tell you, that a valve body cleaning helps often, but of course not always.
This might help you
http://www.zf-transmissions.com/troubleshooting.htm