most housing pine is yellow pine, at least where houses are still being built; that would be the southern US. It is more dense and stronger than the white woods. SPF wood is so labelled because the properties of any of the variants are equal.
dimensional yellow pine is fine, if that is what available in your area (it varies by region). just make sure you buy quality, and it might be a good idea to actually LOOK at it when you buy it. Warping, twisting, cupping and the other standard defects, along with loose knots, are rather easy to spot if you just take the time. If you get your lumber at the Big Box store, you might have to crawl thru a lot of junky #3 wood to find those that you want. If you do this, make sure the bundle has been unstrapped for some time, as a still-bound bundle will not have let the warping, twisting ,etc become visible.
A better choice is to go down the aisle a bit to find the better grade, where almost every stick is fine. The #3 grade 2x4 is maybe $2, the better stuff $4. So a module needs maybe 3 of them? That's a whopping $6 you saved.....
If you are just building a module, heck, buy mohogany. The amount of wood vs the cost of the overall project is insigificant. Likewise, on a module especially, it makes little sense to save $6 using cheap, warped, green lumber (of ANY kind), and then spend a year working on the topside details.
Now, if you REALLY want solid, get some Hardiplank......and a forklift.