Presumably yours is the cable shifter. From the 2wd/4wd select lever, follow the cable to where it goes into the side of the mid-connect housing. The cable is connected to a piece of cast steel that fits over a shaft that disappears into the housing. You've likely broken the roll pin that afixes that piece of steel to the shaft. Have someone move the 2wd/4wd select lever back and forth while you watch that fitting. If it moves back and forth, but the shaft doesn't - drive out the old roll pin and replace it with new. If it's working properly, follow the cable backwards and see if it's loose at the lever end.
If it's a broken roll pin, you can ensure longer life of your repair if you double pin it. That is, get a pin of the correct size for the holes, then a 2nd pin that fits snugly inside the 1st pin. Nest the pins together before insertion, then tap them in as a pair.
//greg//