Wait to hear the low-down first before you decided on changing motors....sometimes the simple fix of replacing head gaskets will be all that is needed.
My *guess* is that it's an A340F - the same transmission series used on the later 3RZ 6-lug Tacomas.... Not sure what trasmission it is. Auto 4x4 w over drive and a ect button. ...
I would go with a 3rz engine rather than a 22R if you want to swap for a 4cyl. :shrug: