All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
A vow is not concluded based on intention alone; rather, it is concluded after uttering a statement by which one obliges oneself to do something, as we have clarified in Fataawa 10716 and 154575.
Therefore, you are not obliged to work as a gynecologist and you are not required to do anything if you do not take up that specialization and choose another.
You have no reason to fear to be affected with a disease as a punishment from Allaah for not studying gynecology; so avoid these obsessive whispers and ignore them completely.
Allaah Knows best.