If you never see really frigid temperatures, it's best to stick with 15W40. 5W40 is a little too thin at higher temps.
As to which kind of oil, you can find mineral (dino) oil, synthetic blends, semi-synthetics, oil synthesized via hydrocracking, and full synthetics built from the ground up.
Below are some 'rules of thumb' to give you an idea of the possibilities.
If you don't drive it much, you're better off using an oil that has a very high TBN (Total Base Number: the measure of how long and well the oil will counteract the acidic combustion byproducts), as well as using filtration that can trap water. This will help protect the engine while it is sitting unused.
If you drive so much that changing the oil is a nuisance, you're better off using an extended-life synthetic and top quality lubes so you only have to change every 25,000 miles instead of every 5,000.
If you only drive 15K-25K miles each year, use a good high-quality filter and ordinary lube and change it every 6K miles.
If the truck 'never' stops running, use the best synthetic lube you can get, install a bypass filtration system, change the filters on the regular basis whilst adding makeup oil, and drain the lube every 75K-100K miles.
As I said, these are ideas, not "do as I say or you will wreck your motor" commands. You should do what makes sense for you. And only you can determine what that is.