I thought I've read somewhere that "mental disorder" is a broader term, whereas "mental illness" was mostly referring to conditions that impact general behaviour and functioning. But okay, let's use them synonymously, in which case it's still not a severe mental illness that can be cured.
A sexual preference towards men, women, or nonbinary isn't a mental illness. A sexual preference to children is.
Even if go with this assumption, that doesn't mean it requires treatment (which is not really possible anyway), let alone forcefully.