Doubt anyone here has tried it, since the diesel wasn't available to us here. Hard to know what compatibility is possible without some degree of specs, normally provided by the FSM. Just knowing the transmission code alone would immediately answer that question.
However, from a cursory search of Google and some Nissan part numbers (
http://nissan-europe.epc-data.com/terrano/wd21/), nothing suggests they'll be compatible. It seems that TD27 has more in common, transmission/bellhousing-wise, to the Z24 and KA24 engine families. One particular post I read (sorry, didn't get the URL) suggested that the AT boxes shared at least transmission code, but you're looking for MT compatibility. (You didn't indicate 2wd or 4wd, though).
You may want to try the PCoA forums (
http://www.pcoa.org.au/forum/index.php) if you haven't already; I don't know if they've got much knowledge about the WD21s, but being an Aussie forum, they'll have better exposure to the TD27. There's some limited info at NPORA (
http://www.nissanpathfinders.net/forum/), but for the same reason here, they're mostly North American-based. There are some topics about the TD27 that may be of use, though.
In your scenario, is it possible to get measurements for simple elimination's sake? Like, are the gearboxes (without bellhousing) even the same length? Same output shaft? Same tranmission mount? Same shifter position? Are they even visually the same? If they're from the same transmission family, the similarities should be pretty obvious.
Good luck!