What to look for when buying an engine.

Hi, new member on the forum, been lurking around for a while but as I plan to start a G3 swap in my 1971 Dodge Dart Swinger I thought is was time to register.

Anyway my first question is what to look for when sourcing an engine. I'm looking for a 5.7 345hp engine so that limits the selection to 2003 up to 2008 engines. Reason is that a bigger/stronger engine might be difficult to get approval for by our local version of DMV.
So should I look for a truck or a car engine?
What mileage should be the upper limit to have a fair chance of avoiding a rebuild?
Are the 2008 engines better than the earliest with regards to loose valve seats and other potential issues?
See there are a lot of engines on ebay sold by wrecking yards etc. Would they be a good place to get the engine from? Buying a wreck to pull the engine is not an option as I'm located in Norway and there aren't many Hemi cars around here in the first place.