Sounds like a possible TPS (throttle position) but lets hope not as they are an expensive part. I had one go on my 04 diesel and it was more than $400. I had about 200,000 miles on it then. Mine threw a code but did some weird crap like you describe leading up to the part failure and check light.