Assuming you meet other qualifications, you appear to be eligible based solely on the timing of your prior bankruptcy. Under the 2005 changes to the bankruptcy laws, in a Chapter 7 case, you may not obtain a discharge within 8 years from the date of filing of the first Chapter 7 case. The time period runs from the date of filing of the first case to the date of filing of the subsequent case. To file under Chapter 13, you need only wait 4 years from the date of a previous Order of Relief in a Chapter 7 case or 2 years from the date of discharge in a former Chapter 13 case. There are many other considerations that you should discuss with a local bankruptcy attorney. Many provide a free initial consultation.
Normally a chapter 13 is the best way to proceed when you have a house in foreclosure. I suggest you contact a bankruptcy attorney as soon as possible to review your options and determine if a chapter 13 will work for you.