How to disable SMS for two factor authentication?
Solution 1:
Unfortunately you cannot disable the feature.
Your best bet is keeping the number used completely private. I.e. do not use your main phone number for this - use a number specifically reserved for 2FA codes so that this phone number is not shared with others.
Also I would like to point out that the loophole described in the link you have included has actually been closed shortly after that article was written through a collaboration between T-Mobile, Verizon and AT&T.
However it is still true that if you have some other means of providing a second factor than SMS, then you should definitely go for that instead. SMS is the least desirable of all options.