Also, both shift solenoids are OFF when in overdrive, so you can scratch that off the list of possible cause too. A bad shift solenoid would cause gear skipping or wrong gear starts but not a failure to engage overdrive.
350 000 miles on a factory E4OD? VERY impressive
The E4OD is equipped with a coast clutch that automatically allows the RPM to drop to idle and the speed of the truck over runs the speed of the crank shaft. The PCM is allowing this to happen because its supposed to be in overdrive but since that won't engage, the transmission over runs at idle engine speed. I had similar behavior when I screwed things up in my E4OD. It would neutral out on coasting even in second gear. It does not necessarily mean that sprags and/or one way clutches have failed.
This might not be major, but there is of course the risk that it is if you have that many miles on the tranny.
This could actually be as simple as a stuck 3-4 shift valve in the transmission and that can be repaired with the trans still in the truck. If that is the problem, then the worst case senario would be a new valve body from VBX for under $400, but its actually possible to replair the valves yourself in some cases. Nice thing about VBX is they are ready updated and shift very nice.
I would not pay full price for the truck, thats for sure.