Sometime the vehicle will not change from 1st gear to 2nd gear and if I stop, turn the vehicle off and drive off again, the car will change gears as it should. Somtimes iam driving along and the vehicle goes into this want change gears mode.
Actually, second gear is the default for "limp mode". That allows you to drive slowly to a repair shop without needing a tow truck. As a general rule, if it goes to second gear as soon as you shift into "drive", it is a sensor or other electrical issue. If it starts out in first gear like normal, then bangs to second gear during or right after an up-shift, it is usually due to slippage in one of the clutch packs. That happens more commonly on high-mileage vehicles. Years ago we had a year or two of warning because we could feel the shifts become sloppy or soft. With your computer-controlled transmission, the computer knows how much wear has taken place in the clutch plates and it modifies shift timing to overcome that wear and provide continued crisp, solid shifts, ... Until the day comes when it can't update those shift schedules enough. That's when the slippage takes place with no warning and it goes to limp mode. The clutches don't actually wear out any faster. It's just that you don't having the warning it's happening.
Your mechanic will start by reading the stored diagnostic fault codes. That will tell him the reason it went to limp mode. He can also read the "clutch volume index", (CVI). That is a set of four numbers corresponding to the volume of fluid it takes to apply each clutch pack. An experienced mechanic will know how much life is left in each clutch based on those numbers.