I would certainly throw a $20 cam position sensor at the problem. I just posted pics on how I changed mine. 10mm socket and that's it.
http://forums.trailvoy.com/showthread.php?t=70014
Having a SES light and a code like that will suppress the cruise control. GM designed that as an annoyance factor to make sure you're motivated to fix the SES code.
If the throttle body was messed up to the point that you needed to replace it, it would throw other codes AND put you into Reduced Engine Power mode and you'd barely be able to limp home.
I gotta ask: The exact code is P0340, not Po340 (I'll edit your title to help future searchers.) Did you search for either of these terms? "P0340" comes up in 38 threads.