I didn't file a 5405 in 2016 return, but I sold that home in 2016. Do i need to amend before i file 2017?

The turbo tax app doesn't let me specify accurately this situation.  So I'm stuck with filing and no $500 payment goes to federal.  Federal rejects the efile and I have to try again.  

Do I need to file and pay the $500 as if I'm still in the main house and then amend 2016 with my 5405?