Yes, OHV and SOHC used the same trans bolt pattern, and same manual trans, M5OD-R1.
SOHC got an extra bolt added for trans and the renamed the trans an M5OD-R1HD, but everything inside was exactly the same.
You do have to change computer and wiring, and finding one for a manual trans that doesn't have the PATS anti-theft system will be hard.
1997 Explorer got the 4.0l SOHC first, and it didn't have PATS that year, but 99% would be automatics, you can pay to have that deleted, but you can do that with PATS as well.
Outside of being able to use the existing transmission all the work to do this is the same as swapping in a 5.0l V8 from an explorer, which would be a better swap IMO.