Automatic transmission locks up in 3rd gear

I was driving my 97 explorer 5.0L auto transmission 2wd at about 30mph, my truck went to shift to 3rd gear as is was accelerating normally. Just after the shift started the car just came to a dead stop like I pulled the e-brake. Luckily I was on a old road thats basically gravel so it skid on that. After I came to a stop stepped on my brake put it in park and looked the truck over. Nothing abnormal. Put it in drive and was able to go again. Got to third and the same thing happened. Now Im worried. I drive slow home not >20mph. I turn the truck off check trans fluid level (no abnormal smell, level fine), brakes ok, nothing leaking, nothing noticably broken. Go to slowly try again later after the truck cooled down and now its in “limp-in mode” and will not go into third gear. I read somewhere with a tranny issue similar issue that someone said it could be a stuck valve in the transmission. If so how would that cause what happened? I read elsewhere that gunk transfusion/ lucas trans fluid can help free stuck valves. Is it worth it to do a fluid change and try these additives or is it likely a whole other issue. If its going to cost much more than $400, I can get another trans from salvage yard and swap it myself for $350-$375. Seen anything like this before?

Trans fluid is checked with the engine on and dthe vehicle either in park or neutral. You say that fixing it or swapping, there does not seem to be a big price difference. I would not take the chance on a use tranny, I would get it fixed.

Go ahead and have a good mechanic change the fluid, it might help, but I think you are going to have to have repaired.

I dont know how much it would cost to fix. I was wondering if it was the stuck valve issue. I already have the trans fluid and filter and gasket to do a fluid change myself and could get a used tranny if its going to cost a lot. If the tranny needs work Ill have someone else do that but fluid change or tranny swap I could do myself.

It sounds like the transmission shifts to third but remains in second. Two gears at once equals a dead stop. It could be something broken in the valve body or it is jamming. It could be something else too. Somebody will have to look inside.