Pedophilia and homosexual orientation are quite different in cause.
Pedophilia usually occurs in someone who, for some reason or other, got
psychologically and emotionally arrested in early childhood, while their body
and intellectual skills reach adulthood.
Persons in this predicament are not erotically attracted to other adults. Instead, the pedophile is erotically attracted to children at the same age that the pedophile's emotional maturation came to a halt.
Pedophiles will use their adult intellectual and social skills to find jobs and situations that give them access to children and, if caught, use their adult level skills to rationalize that they are entitled to do this.
A pedophile may or may not be homosexual. That is an entirely separate condition.
Homosexual orientation is neurological, and from the stand point of evidence based science, homosexuality is natural.
Homosexuality is not caused by arrested psychological development.
The sort of 'natural law' argument the Catholic church uses to justify its stance against homosexuality is based on outdated observations of natural made by Aristotle and others in the days before the invention of microscopes.
As an example of what "natural law" actually looks like: junior male cuttle fish have been observed to alter their own appearance to
look female.
[
www.google.com]
If Aristotle had been able to describe all this, perhaps Western history would have been a lot happier.