Customer welcome to Just Answer!.
I've been trying to draw some sort of connection between these codes (sorry for the wait) but haven't come up with one yet. Let's take them one at a time... they may not be directly related.
P0107 (MAP SENSOR VOLTAGE LOW). This code can be set by a bad MAP sensor, a shorted signal circuit or software issues with the 1997 JTEC engine controller. I'd expect it to be a software problem, particularly if you operate the truck at higher altitudes.
Using engine braking to slow the truck (especially at altitudes over 7000 ft) can draw a very high engine vacuum. The MAP sensor had operating parameters established by engineering that were expected to be within a certain voltage range during normal operation. As so often happens, real life intruded. The cutpoint for determining P0107 was 0.2 volt in the original version. This was a voltage that could be obtained even in Metro Denver during a deceleration event when the engine reached its maximum volumetric pumping efficiency, right around 3000 rpm. Add in a dirty throttle body, which will cause a higher engine vacuum to be created and you can exceed that 0.2 volt parameter pretty easily.
A software flash was released that corrected the cutpoint to a more realistic 0.1 volt and the P0107 has been pretty much a non-issue since. You may need to have your PCM updated to take advantage of this feature. TSB 18-08-00 is the specific update for this code.
P0133 (UPSTREAM 02 SENSOR SLOW RESPONSE). It may be a sign of a worn oxygen sensor or it may be another update. Slow response means the sensor doesn't respond at the same rate as it should, with fewer half-cycles per unit of time measurement. The sensor is still working, it's just lost some of its youth. TSB 18-12-97 describes a similar code as this, but doesn't include the specific P-code (uses the engineering hex-code, which I don't have a cross reference for). It's described as UPSTREAM 02 SENSOR SLOW DURING CATALYST MONITOR. I'd recommend doing the flash update and see what happens. You may need a sensor, but may not.
P0138 (DOWNSTREAM 02 SENSOR SHORTED TO VOLTAGE). This normally means the DS02 has a failed electrical heater. When the sensor doesn't come up to operating temperature (600 degrees plus) the 5v diagnostic bias voltage supplied by the PCM sticks around and makes the sensor appear to be contaminated by another voltage source. The sensor will code if more than 1.2 volts are seen on the signal circuit and a cold sensor will be closer to 5.0 volts. Barring loss of power or ground to the sensor, it will simply be a worn-out downstream (after catalyst) oxygen sensor.
The flash updates I mentioned earlier both go in at the same time. When you update a controller, you always get the latest and greatest version. In this case it means several updates go in at the same time (up to seven). Besides the erroneous DTC corrections, there are cold engine driveability improvements and the potential for engine ping reduction. It's a manual-electronic adjustment that must be done with the factory scan tool for timing retard to reduce engine ping, so the tech needs to know whether you would like to try backing the timing down... it won't do it automatically. You have a choice of zero, 2 degrees or 4 degrees of timing retard. It will reduce engine output somewhat, so don't select any timing retard if you're not having a problem with engine ping.
That's about it. In a nutshell...
Flash the PCM with all available updates.
Clean the throttle body to restore minimum airflow. This is nothing more technical than cleaning the black rings you will see inside the throttle body bore and blades. Carb or throttle body cleaner works just fine for this.
(probably) Replace the downstream oxygen sensor.
Write back if you have any questions. I'd understand (lol)!