1997 Ford Explorer Transmission vs 1999?

My 1997 Ford Explorer sport has been having problems with the transmission. I have a 1999 Ford Explorer that is no longer drivable, but still has a working transmission. I was wondering if the two are interchangeable (by a good mechanic, of course)?

No two different transmissions used in 97 a 5R55E and 99 a 5R55W can't interchange those transmissions