The Dealership should have been able to hook up their scanner and find the problem in less than 5 Minutes. Yeh maybe a Tune up but that is Vague, I could suggest a ton of parts too to swap out for a TUNEUP.
Try this disconnect battery for 5 minutes then before restart turn the key to the on position but do not start, once all the lights and chimes go out (Don't Worry about the check engine light) then slowly press on the gas pedal in a gradual motion until it hits the floor then slowly back it off and let it depress slowly until its back in the normal position. start the Truck (May not do nothing on first try but don't panic just turn the key off and do again it should do its thing on the 2nd try). Let it run, and give it a few shots of gas and let us know if anything changes. Also after you shut it off, quickly turn the key 3 times to the on then off position and on the 3rd motion fwd leave it there. The lights where the speedo should dislplay some codes (Write them down, IE: P0440) and then say DONE, then your done. With the codes we could offer further advice. Good Luck and Welcome!