I replaced the fuel filter, fuel sending unit, fuel pump, oil pan, and glow plug relay. Also my glow plug relay clicks when I turn the key.
You did all that before or after it has trouble starting?
Why did you replace the fuel sending unit?
The GP relay shouldn't click, click, click when key is first turned on unless the engine is hot. How long does the WTS lite stay on?
Is your oil level between the hash marks on the dip stick? It must be there.
How many miles on the oil? Dirty oil makes for hard start.
Did you use ether to help start the first time?
A diesel engine won't normally shut off by itself unless it runs out of fuel or develops air intrusion.
If the ICP sensor is leaking oil around the wires, it needs to be changed. You can unplug it, then the PCM takes over to a default IPR PSI.
Open the filter drain valve, if you have a clear piece of hose on it, see if you have full flow out of it (no air bubbles) when someone cranks it over.
To start you must have around 400 PSI oil injector pressure. Cranking RPM around 350 to 500. Fuel 50 PSI.
Pull the plug on top of HPOP, oil level should be within 3/4" from top. LPOP fills the HPOP, it may be draining back to the oil pan and would need a long crank to refill.
If your ICP connector has oil in it, change it. Don't argue, just change it. Don't check other things first, just change it.