The correct sentence should be:
Wǒ duì shùxué bù gǎn xìngqù.
我 对 数学 不 感 兴趣。
I’m not interested in math.
Pay attention to the word “对 (duì)”. 对 (duì) is used as a preposition here. It means “to” or “toward” an object or target. “数学 (shùxué)” means “mathematics,” and “感兴趣 (gǎn xìngqù)” means “interested in.”
Subj. 1 + 对 + Subj. 2 + Verb
In this case, “数学 (shùxué) mathematics” cannot be subject 1. Because 数学 (shùxué) is an inanimate noun. Math cannot feel interested or disinterested in anything. The correct sentence structure should be “subject(animate noun) + 对+ subject （不）感兴趣.”