Sorry, that’s incorrect.
Autism is commonly comorbid with mental health disorders (aka “mental illnesses”) like anxiety, depression, ADHD, etc., as well as with intellectual developmental disorders, but autism is still considered, at worst, a neurodevelopmental disorder, regardless of where an individual falls on the spectrum.
Both the DSM-V and ICD-11 are in agreement about this, for what that’s worth, but you could also just do a search for “Is autism a mental illness?” on Duckduckgo, Kagi, Searx, Bing, Google, or whatever, if you want to confirm.