That’s because durations of months are counted a bit differently.
xか月(げつ) means “x months” where x can be any number. So to ask “how many months?” you have 何か月.
何月(がつ) simply refers to “which month?” and can’t mean anything else.
I remember how much problems I had with it when I first started Japanese – long before I found out about Textfugu and WaniKani… Iirc, it actually made me drop for quite a while…