I am not going to try to figure out what your attorneys meant. If you want an explanation of why their advice differs, you should ask them.

If your goal is to modify your loan, and the lender won't do that unless your account is current, filing for Chapter 7 bankruptcy won't fix that problem. That may be what the one lawyer meant; but I can only guess.

If the question truly is, "Can you file for Chapter 7 bankruptcy if you're behind in your mortgage payment," and nothing more, then yes, you can.