Could be a few things, such as Transfer Case ECU, the ratio control motor, possibly the speed sensor. First, check BECM fuses 4&6 as they feed the Transfer Case ECU and Ratio Control Motor. If they are good, try inserting a fuse in slot 11 (5amp min) and see if the transfer case shifts into neutral and you get a Tranfser Case Neutral message on the dash. As far as prices for ECU or motor, not sure but seem to recall the are not too expensive.
-Coach