The 2.3 diesel will swap into your Bronco II with out any issues. To make sure the swap is done correctly you will want to pull the front wiring harness and the cluster so you can swap them into the Bronco II. You will need to gut the Bronco II engine bay and swap all the diesel parts, especially the starter. You will need to remove the bellhousing off the diesels tranny, and leave the flywheel on the back of the engine. You have a few choices of transmissions depending on the year of your Bronco II. If you have an 84-87 Bronco II, I recommend you use the FM145 4x4 tranny, if you have an 88-90 Bronco II, I recommend you use the FM146 4x4 tranny. As stated above you may already have one of these trannies in your bronco II, but you will need to swap bellhousings to mate the engine and tranny.
The only real issue I can see here is your ranger is a 2wd, so you may have a hard time hooking up the 4wd light on the dash because your 2wd diesel cluster lack a 4wd light, You may also need to spice the two harnesses together if you have electric windows power lock etc. Otherwise this is a straight forward swap that can be done over the weekend.
Also take special care with the fuel tank, you probably don't need to swap tanks be certain to have the tank cleaned and flushed.