Keeping the mortgage has both positive an negative impacts on your credit score but both can be inconsequential based on what other accounts you have.
On the one side, keeping the mortgage increases both the number and average age of your open accounts. This a good thing on your credit reports. However, if you already have a number of other open accounts (credit cards, other loans, etc) and the average age of those accounts is relatively old (older average account age is also good) then it won't really matter that you are closing the mortgage.
On the other side, the mortgage increase the amount of debt you currently have and would negatively influence your debt to income ratio when you apply for a new loan. If you only have 1 year left on the loan it probably doesn't matter much though.