No, on the 2WD question, you need a 4x4 transmission
You can use an M5OD-R1(M5R1) transmission from a 1991 to 2008 3.0l Ranger or Mazda B3000 4x4
Any of these years will bolt to your transfer case and 3.0l Vulcan engine
Your speedometer cable comes from transfer case so no worries there
(if you ever change transfer case it must be 1997 or earlier or there would be no speedometer cable hookup)
Must, of course, be from a 3.0l engine since the bellhousing on these transmissions can't be swapped, its part of the main case
Only difference over the years will be the Reverse light plug on the transmission, so pull your reverse switch out and put it in the "new" transmission if plug is different, might not be, but pull it off the old one in any case, free spare switch, lol
The 3 rubber plugs on the back top of these transmissions could dry out and leak ATF(these manual transmissions use Automatic Transmission Fluid, heads up), so give the plugs a good look before installing transmission, replace if you see they are leaking
The 2001-2008 M5R1s have an extra sensor(OSS) that you don't need, doesn't hurt anything just leave it unplugged