Yep, they're cheap on ebay, but you might get nickel and dimed for the accessories.
What I did was go to one of the bigger yards in my area and tell them what I was doing. They happened to have a 2006 that they hadn't torn down yet, so I was able to negotiate a price for the complete swap. The price started at $750 for just the engine. The guy at the counter then got out his calculator, "plus $100 for PCM, plus 75 for a/c comp, plus..." It probably would have come out to $2000. I offered him $850 and the fact that he wouldn't have to inventory or tear down anything. Everybody's happy.
Just another thing of note. The guys behind the counter at the yard are usually gearheads like us. Spend a few minutes, shoot the shit, tell them what you're working on, and they'll -more often then not- bend over backwards to help you out.
An even better idea is go to a place like copart.com and just buy the entire damned truck for $850.