Are you facing the same problem, when we are installing the habitat project with Sitecore 9, however, you have already installed the .Net framework 4.6.2 in your machine, also the 4.6.2 version is not showing in the visual studio project > target framework.
I was also facing the same problem, as I was installing the fresh new Sitecore9 with habitat in the new machine.
After installing the .net framework 4.6.2 again, it was saying “.NET Framework 4.6.2 or a later update is already installed on this computer
After some research, I found the solution, you need to install the “Microsoft .NET Framework 4.6.2 Developer Pack”
Here I the link, Just download and install it, hopefully it will work, and install the .net framework 4.6.2, just restart the visual studio again, and re-run the solution again.
I hope, this article will help you to configure the habitat project with Sitecore9