What did you do for the transmission so far? If the code is related to any solenoids, it's time to replace all solenoids. That's like doing one brake pad on one side, don't; do them as a set unless the mileage is very low.
If the ATF looks and smells okay, then do the solenoids and see if that corrects the issue. If it doesn't then if the symptom is major, it might be time for a shop to check it out. If the issue is minor, then a VB kit and a couple three Sonnax VB upgrade parts would be wise. I do all of that and accumulators anyway any time I get a different vehicle. It all helps functioning, and is not wasted when a rebuild is done if needed shortly later.
If the VB has to come off, you must replace the VB gaskets, buy those in sets and buy an extra one of each as spares in case.
For the transfer case, use only obsolete
Mercon I(now in store still called
Dexron III(used to be called
Mercon/Dexron III)), or the obsolete
XL-12, but never the newer versions like
Mercon V, LV etc. The latest TC fluid is also expensive like XL-12 used to be, about $25, so instead, buy the new
Valvoline TC fluid, which is about $6 a quart from Amazon;
https://www.amazon.com/gp/product/B071VDQLVZ/?tag=serious-20
The transmission does take Mercon V, which is slicker than Mercon and can hurt the TC.