In the best case, your wait may be only two years. And there are special circumstances where in dealing with an FHA or VA loan, you may not have to wait at all. You should consult a lender or a mortgage broker to see if you qualify.
To work with an agent, you should obtain a pre-qualification letter from a lender, anyway.
I included a few links for you to consult.
Generally, a borrower presents a better profile if they're not in default on their current mortgage. And your chances improve if you have 20 percent to put down. You enhance your profile by having paid your bills on time, too.
Here are charts that you might find helpful:
The bottom line, however, is money is tight. Best of luck.
PML of Longmont, CO