Oil pump

how hard is it to replace an oil pump on a 2000 dodge derango 4.7 engine? oil level is good new oil pressure sensor hooked up an oil pressure gauge and with the engine at normal operating temp. the pressure reads about 20 psi and at 3000 rpms it jumps between 20 and 30 psi.the original problem was the oil pressure gauge would drop to zero then jump back to 40 going down the road after it had been driven for a while thanks

Do you have a mechanical oil pressure gauge and a pressure sensor for the oil light or do you have an electric oil pressure gauge that you just put a new sensor on? The electric oil pressure gauges tend to be problematic.

How many miles on it??

it has a electric oil pressure gauge but i removed the oil pressure sensor and installed a mechanical gauge and that is where i am getting my readings not by the dash gauge. it has 97.000 miles