The 2006 Pathfinder will have the 126kW engine and the 2012 should have a 140kW engine (different heads, different ECUs). The turbocharger also sits lower and the 2012 car MAY have an electronic actuator (the 2006 will use vacuum control of the turbocharger).
However - with that said - I've seen a LS engine in a D22, so never say "never".
I think the mounts etc will be the same - so as long as the ECU comes with (and the gearbox is the same ie don't put a manual's ECU in an auto and vice versa) it shouldn't be too hard to do.