The only thing they changed on the VQ40DE was a part on the intake... I can't remember if it was on the upper plenum or lower manifold, but it was sometime around 2008/2009. As far as the long block assembly, 2005-and-new Frontier/Xterra and 2005-2012 Pathfinder are all the same and will work.
I have a question to which I am in critical need of help. Firstly I have a 4x4 Frontier (2005) to which the engine got damaged. I want to buy a 2018 engine with the exact specs and (Vin A) matches. Will I encounter any issues for this swap? Please advise