I'm pretty sure this is prevalent in many 4WD Rams, especially the Power Wagon. I'm not a proponent of throwing parts at a problem, but in another board forum the solution was replace the Transfer Case Position Sensor (TCPS). It's in an awkward position on the Transfer Case (TC). I replaced it and the message has not reappeared. I assume your 3500 has the BW 44-47 TC, so the TCPS is located above the boss for the shift linkage lever, driver side of TC. MOPAR Part # 68211454AA. If it's a 44-46 then I cannot speak to it. The sensor must be in shift motor or the mode sensor.
View attachment 465555