It is a psychiatric disorder tho, there’s a general consensus on that.
There is a lot of consensus in psychiatry, not so much on psychiatry itself. When we politicize, we learn that pathologization in mental health are most often tools of oppression, not remedies. In the case of pedophilia, pathologization invisibilizes and deresponsibilizes those who act, it's also prevents retorative justice and prevents society from tackling the real issue, being the dominations systems that allow pedophiles and rapist to act.
This taboo in society that was created is not something inate to people, you are not born one day with the innate thinking "that, I should not do it",
you learn it. This is why you can see pedophilia all around history and in multiple societies without social barriers.
And the same goes for the attraction on children, it's also a learned trait pushed by the sexualization and infantilization and so on. As such, once someone gets "attracted", they can't really help it and they can't really unlearn that, but it doesn't mean that they will act.
Now.. The action of pedophilia is something done because of power, something conscious. And depending on the society in history it will be more or less forbidden. Pedophiles are not sick, they are people in power using that power on others. Of course it's something that must be stopped, but to be stopped we have to learn what it really is and stop pathologizing.
There are no "illness" of pedophilia. It's simply a oppressive behavior linked to influences of systems of domination, just like any others and it will disappear if we attack these systems.