2005 GMC Yukon

My vehicle will basically go out of 2WD when I am driving and slip into neutral. It still shows that it is in gear but actually isn’t. I have to pull over and shift it into 4WD high to get it back into gear. I am looking for solutions. THank you.