Welcome to TRS
4WD lights flash because there is a problem with the 4WD system
When you start the truck the 4WD controller(GEM module in 1998) checks the position of the Shift motor on the transfer case to "see" what position it is in, 2WD, 4H or 4L
If it can't "see" the position then 4WD lights flash letting driver know there is a problem
There is no "code", the 6 times is just 6 times
Your 1998 4WD system has 4 parts, 5 if you count the PVH hubs
Switch
GEM
4x4 Relay Box
Shift motor
Switch on the dash connects to GEM(behind radio)
GEM connects to relay box(behind GEM)
Relay box connects to Shift Motor
GEM also connects to shift motors Position Contacts
You select 4H on switch
GEM sees that and activates 4x4 Relay that powers up the shift motor
As motor turns the Contacts in the motor change
GEM deactivates relay when Contacts are in the correct position for 4H
There are 3 fuses in 1998
Engine fuse box #3, 20amp, powers motor
Cab fuse box #26 and #27