Possible? yes Easy? Can't really tell, I've got no idea.
you should have a TX10 transfer case in your Navara. See if you can find out if the D22 uses the same transfer box. If it's not too new, then I think the answer is yes, and it should match up at that end. The other end is a different story. Can't help with the bellhousing.
You may have other problems such as speedo cable normally goes in the gearbox. not sure if that will match. Also could be issues with switches in the gearbox.
Might be better looking for gearboxes in Pathfinders and Terranos of a similar age. Anything with a TD or SD diesel should fit (I think)