* Exact Model: The "truck" designation is broad. You need to specify the *exact* model (Hardbody, Frontier, Titan, etc.) and even the sub-model (e.g., King Cab, Extended Cab). Engine compatibility is heavily dependent on this. A Hardbody engine won't just drop into a Titan.
* Engine Type: Even within the same model year and truck type, different engines may require more significant modifications for a swap. You'll need to verify the specifics of the donor and recipient engines – their displacement, configuration (inline, V), and accessories. Some swaps are relatively straightforward, while others can be complex.
* Transmission Compatibility: You'll also need to ensure the transmission is compatible. Not all transmissions will work with all engines.
* Wiring Harness and Computer: The engine's wiring harness and computer (ECU) will likely need to be swapped as well, and may require some adaptation or modification to work correctly in the recipient truck.
In short: While generally compatible *if the models and engines are very similar*, a simple "yes" is misleading. You need to research the specific engine and transmission codes for both trucks to ensure a successful swap. Consult resources like Nissan service manuals or online forums dedicated to Nissan trucks.