This is fairly common. The linkage is nothing more than a metal rod held in by two rubber grommets. In time, those rubber grommets waste away. A new bar with grommets will probably be $30-$35, but I'm not satisfied with fixing a problem so that it will just reoccur, so I started looking into upgrading the linkage to something more lasting.
After spending too much time researching something this simple, I finally got a threaded connecting rod
and two self-lubed ball joint rod ends
(aka, hemispherical or heim joint studs) from McMaster-Carr. With shipping, it came to about $33.
My main concern was fitment. I didn't have the rod to measure the distance between the 4WD shifter and the transfer case lever precisely. The shifter was totally loose, and the original part's design of having a set screw at one end suggested the distance may vary between trucks. For my truck, I used a tape measure and guesstimated right around 14" is what I needed, give or take a bit. The McMaster-Carr website provides detailed measurements of the parts, so I dove into the math to look for something with a range around 14".
I was able to determine that with the above 12" rod that's threaded to 1 1/4" deep on each side mated with two rod ends that were 1 15/16" from the base of the shaft to the center of the stud, and having 1 1/4" threaded shafts themselves, that gave me a range of approx. 13 3/8" to 15 3/8" if I resolved to no less than 1/4" of used thread at both ends. 1/4" of thread may not sound like much, but at #24 thread, it's still a fair bit.
So with that range I accepted the risk and ordered the parts for what a new OEM rod would cost. It fit perfectly (I ended up using about nearly 1" of thread at each end) and I'm quite happy with the very solid, click feel of a direct connection (not rubbery). I picked up a couple of nylon lock nuts, washers, and jam nuts at a local hardware store.
Note: this is for my 2005 short bed quad cab, so your mileage may vary.