I encountered this problem today with Forge versions 1.12.2 and 1.12. Including a not so great workaround below for the community.
Use Case:
As a parent I am attempting to install a mod (Tektopia) for my son and need to use Forge 1.12.2 as required by the Tektopia install guide.
Minecraft Java Edition - Launcher 2.1.5964 is being used as the client
Problem Description:
Downloaded Forge 1.12.2 and install per the installation guide (which really is just a copy of the standard installation instructions for the Forge client).
Install Forge 1.12.2 using the client option and making sure to verify that the installation path is correct. Note that successful installation is indicated by the installer
After installing the 1.12.2 Forge client I start the Minecraft Launcher .
I then look for Forge 1.12.2 listing in the Installations list so I can start the game using the desired mod
Note: The expected installation is not showing up at all in the launcher's list.
In opening launcher_profiles.json from my .minecraft folder I notice that there is an entry for the Forge 1.12.2 installation, however unlike the the other versions of Forge I have listed in the file, this version was given a tokenized name for it's JSON "profiles" entry as opposed to "Forge" or "forge" as is used by my other profiles. I referenced 2 other systems I own with Minecraft mods installed and noticed all of the other profile names are either "Forge" or "forge". These are the defaults given by the Forge installer and not touched by me.
Workaround:
This is not a great workaround and is destructive, but should provide a clue to a knowledgeable developer or Minecraft enthusiast as to what the root cause is. This is as far as I was willing to take my investigations.
Warning: the following "workaround" will essentially cause Minecraft to write a new version of the file which will remove all previous profile listings and require you to login again with valid credentials.
Either 'touch' launcher_profiles.json by making saving it or delete the file altogether. If you touch the file by making a minor edit, Minecraft will wipe the file and write a new one without your previous profiles.
Start the Minecraft launcher. You will be prompted for your login credentials
Once the launcher has started the 1.12.2 (or 1.12) forge profile will be in the list of installation profiles. In looking at launcher_profiles.json the profile name will now appear as "forge" instead of the tokenized name that was noticed when the 1.12.2 installer was used.