Michelle Brailsford's Answer:
There is a high degree of probability that your boss' agenda is not only self-serving but in service of the team, the department or even the function.
You say that he was approached by someone that he feels "competitive" with. This competition may be for valuable resources like headcount or budget. Politically astute bosses know that they must promote self and team (appropriately) in order to survive and thrive.
You say that he is "using you to show worth". Well, I would hope so. If you have 10 years in the business and know how to do the job with very little guidance, he should be "showing you off". Hopefully, he is trying to position you and everyone on the team in a way that shows "worth". His job is to promote you and the team.
Now, making critical comments about you is not the best way to either position you as credible with the stakeholders or to motivate you. However; he could simply have a coaching style that focuses on constructive feedback instead of on strengths.
Having said that, there is no excuse for making gender related comments either in private or in public. The next time he makes such a comment, I would reply with humour so that he doesn't feel threatened but showing him that you will not "put up" with being "put down".
In terms of how to handle the new role that you have applied for, you say your current boss is one of the decision-makers. I am afraid that if you are good at what you do and if this new role does not fall within your Managers' remit, he may block your movement as he will want your competence and commitment to remain within his team or department.
The only way to ensure that he considers your request, is to make an argument for WIFH (What's in it for him) to let you transfer.
The same advice applies if the new position would continue to report to him. You will need to make an argument for how being in this new role will help increase his status, help him compete for resources and/or otherwise make him look good within the organisation.