Wow, this is going to be fun. I'm going to get my being a dick out of the way first.
RockAuto: RockAuto is a website, not a physical store. To get specific part number we really kinda need the truck sitting right here. You will just have to look them up by name, not number.
Ok, that was fun, now down to business:
A PCM should not stop communicating after replacement. If your scanner is powering up off the diagnostic connector you probably got a bad computer. If you still have it, throw the original back in and try again.
The GEM is pretty specific to the Ranger. I have seen Explorer ones plugged into Rangers and Sport Tracs but things like electronic 4x4 and stuff tend to not work correctly or consistently and the module is constantly pissed off about not being able to find the rear wiper circuit.
You are supposed to program the GEM, but in a 98, in theory you should be able to take one out of another truck with identical options (PWL, radio, fog lights, RKE, etc) and have it work properly without being programmed.
The thing about GEMs is that they are responsible for so many things, unless all your lights, your windows, your radio, pretty much anything electronic in the cab is out I doubt it was genuinely fried.
RAP depends on GEM, so if the GEM is cooked, you gotta get that going before you worry about the RAP system.
The other big thing is that if you think you had a systemic wiring issue that may have done damage, you have to be 100% sure that is fixed before plugging new parts in or they will just fry right away.