The above command only works if WSL is not installed at all,
if you run wsl --install and see the WSL help text,
please try running wsl --list --online to see a list of available distros
and run wsl --install -d <DistroName> to install a distro.
Open Settings.
Click on Apps.
Under the "Related settings" section, click the Programs and Features option.
Click the Turn Windows features on or off option from the left pane.
Check the Windows Subsystem for Linux option.
Click the OK button.
Click the Restart now button.