If your goal was to own the home then yes I'd get the mortgage paid down and paid off if possible before retirement.
Then once you get the mortgage paid off then put the mortgage payment into your retirement fund account.
I wouldn't want to have a mortgage debt payment when I retire.
And having a paid off house would be a great feeling knowing that as long as you keep paying property taxes you will still own your home.