Well a couple of questions. How long have you owned this truck? Do you know anything about the trucks history or the previous owner? Did the problem just start or was it with the truck when you acquired it? I searched through my 97 CD (I have a 96 paper manual also but the CD is easier to use) several times and except for what I suggested that the truck may not have the right PCM in it I am at a loss to suggest anything else. I don't know if a gasser PCM will operate a diesel or not because I've never tried it. The PCM in the 49 state Diesel doesn't do that much as far as the engine is concerned. It basically regulates the alternator output, operates the grid heaters, the auto shutdown relay,and a few other misc things such as the tach, water in fuel etc. However if it is an EGR engine it controls the function of the EGR between 140 and 210 deg. F. If the PCM is looking for a sensor that isn't really there and thus is an open circuit it could by default report a "high" reading. This would depend on the program statement for that part of the circuit. If this would be the case, then the EGR function would need to be turned off or the correct PCM installed.
I'm sorry if this is getting to long and confusing.
At this point and to try to save diagnostic dollars I would suggest taking all the numbers off of the PCM and see if the dealer can identify it for you to make sure you have the correct PCM.
Gene