I believe you. You are not a pedophile. But you are caught up in thinking about what you don’t want to think.You have fallen into a vicious cycle where the more you think about NOT being a pedophile, the more you think about it.
This is a normal response to trying not to think about something. The same thing would happen if I told you that you should absolutely, positively not for a moment think about a purple gorilla. Trying not to think about it would be thinking about it.
Please talk to your therapist about how to do some “thought stopping”. Your therapist can teach you how to banish unwanted thoughts.
I wish you well.