Any Rover V8 can go in the '96 D1, but it isn't as much the engine you need to be thinking about, as it is the computer sytem which manages it.
The 3.9 litre was managed by a LUCAS 14 CUX (in US models) system, which was the most basic of ECUs. It only controlled the fuel injection. Igntion and ignition timing were very ordinary coil and distributor systems.
The 4.0 engine in the 96, though the same basic block, has no distirbutor, nor provision for one. Both Ignition and fuel are controlled by the GEMS (Sagem ) generic engine managemet system. If you had a bad 4.0 engine, and wanted to use a 3.9 because one was available, you could change the front cover, doing away with the distributor, adding the cranl position sensor and be done with it.
What you don't want to consider is taking a 3.9 and expecting to use the 3.9s ECU (14 CUX) in the Disco (96) because the Gems ECU also handles some basic security functions.
After mid year 1999, Gems was replaced with a Bosch system, but the Bosch 4.0 and 4.6 can be made to run in a Gems system vehicle without much difficulty.
You really need Disco to chime in on the aftermarket ECU systems available, as he has had experience with them. If it were me, and I had a 96 with a bad 4.0, I'd just go find another 4.0, or a new 4.0 shortblock. Well, actually, at this point, I'd probably part the truck out andget something newer.
That was quite informative, I have a bad 4.0, and a used one will cost upwheres of 1500 were as a rebuilt one will be as much as 2800. I am not sure who might sell rebuild kits but from what its looking like... my best bet might be to drop in an older 3.9 or 3.5 from a RRC. if it is a dirrect drop in. and wait to either build mine back up or find a clean 4.6. so besides replacing the front cover what else might need to be made different to go from 4.0-3.9 or 3.5? thanks.