You should do one more change by either below approaches:
1 Through IntelliJ GUI
As mentioned by 'tataelm':
Project Structure > Project Settings > Modules > Language level: > then change to your preferred language level
2 Edit IntelliJ config file directly
Open the <ProjectName>.iml
file (it is created automatically in your project folder if you're using IntelliJ) directly by editing the following line,
From: <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
To: <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_11">
As your approach is also meaning to edit this file. :)
Approach 1 is actually asking IntelliJ to help edit the .iml file instead of doing by you directly.