First you need to check local vehicle laws, in some states you can only swap in the same year or newer engine, regardless of size, and then that vehicle must meet emission requirements for the year of the engine.
Yes there is quite a bit of work required and parts
The 5.0l Explorers were all automatics so if your Ranger is an automatic it makes for a few less steps.
You need the 5.0l engine and transmission, 2 wheel drive, Ranger trans won't bolt to 5.0l, and wouldn't handle the power in any case.
The 5.0l computer and wiring harness for engine and transmission.
Motor mounts and transmission mounts are different so need to be changed/moved
Exhaust system needs to be changed/swapped
Good read here: MudSlanger's Explorer 5.0 Swap In A 2000 Ford Ranger
You won't need the 4x4 stuff
You will also need to interface the Ranger electrics with the Explorer computer and power systems, this is just general wiring and splicing but is specific for the year of the Ranger and year of the Explorer.
Simpler swap is Carburetor/distributor 302/5.0l engine and an AOD automatic(not AODE), no computer or wiring harness needed, but MPG is less than EFI and needs adjusting over the years