I don't think it's racist to want to be less racist. I read your question sort of like a "Hey, I know I have a problem and i'm looking for help being less racist".
People might be reacting badly to this because they are reading the question differently. maybe they are reading it more as a "Help me HIDE THE FACT that I'm racist in my writing"? Maybe they are reacting to this as if it's a "stupid question" because they think the answer is obvious? (The answer is pretty obvious in my opinion, and I had to take a few minutes to unscrunch my eyebrows and take you at your word that it perhaps honestly and truly never occurred to you to do the obvious thing.)