If you source the motor AND correct non-electronic trans it will be an "easy" swap all things considered.
The ABS will still work as will the traction control as they run off the wheel speed sensors and that's really all unless you flip the switch on the transfer to lock OUT these functions.
You'll need to retain ALL the sensors from the D2 gas engine. Oil pres., coolant temp (both for the ECU and gauge as they both tie into the climate control and allow it to function right)
You'll have to adapt a toothed ring onto the engine somewhere, I put mine on the front of the crank with a custom mount to hold the sensor - that is a 60 tooth with a 2 tooth "gap" if I recall correctly (I may be off a little on that?) The crank sensor then reads this as the RPM signal as well as a signal that the truck is trying to crank properly and not being hot-wired. If you modify ANY of the wires to the alternator, starter or this crank sensor the ECU talks to the BCU and shuts the truck down into a hard lockdown security mode. So they all have to used the same way and be seeing the same signals as they were with the gas engine in place.
You'll need to leave the throttle position sensor hooked up as well, just leave it connected and off to the side someplace. Position is not important.
As to the trans TCU idiot lights etc. and getting the Check Engine Light to not be on all the time - it gets FAR FAR FAR more complicated for sure...... but if you're not concerned with lights being on the dash or inspections etc. the truck will *function* fine without doing anything. Mirrors, lights, seats, dash, radio, heat/AC etc will work fine so long as you keep the BCU and security systems happy.
It is NOT easy, or a quick process to do right. But like I said if you're only looking for a good *running driving* truck and not worried about passing emissions or inspections it's a LOT easier.
The ABS/TC and speedometer work off the wheel sensors so as long as you dont modify those systems they will function fine.
The high pressure fuel pump will need to be regulated down to low pressure or removed and regular lines installed. You'll have to remove the restrictive fuel filler pipe inner guts. Add an extra fuel filter and obviously flush the system.
It will take a whole lot of custom parts, hoses, lines, adapters, wire rerouting etc etc. ALWAY figure on at least double the costs after you add it all up. REALLY. I can not stress this enough. I have access to a machine shop, 2 good salvage yards, every tool I could need and a nice warm shop and it still took 2-3 times the time and $$ I thought it would --- and I've done plenty of similar swaps before. I am doing one right now actually shoving a VW TDI into an Audi Quattro.
GOOD LUCK!