Not sure what you won, if house was uninhabital, the builder should of paid off your Mortgage, or you should of with the money you received. County inspectors missed the problems too, so they too should be on the line for a problem, then of course the lender made a loan on this property with an appraisal that missed the problems, and the home inspector, if one was used, even on a new home there should be a home inspection. It's a matter of checks everything out.
You see the problems, now should you get a new mortgage, will the process allows after two years of a foreclosure with FHA, but you will have to wait it out as your credit was damaged with the foreclosure no matter the reason.
Best to you.