If you are specifically looking for the .NET Framework v4.0 development pack, you can download it directly from the Microsoft Download Center by searching for ".NET Framework 4.0 Developer Pack" or by using the following link: https://www.microsoft.com/en-us/download/details.aspx?id=24826
If you have already added the "Microsoft.NETFramework.ReferenceAssemblies" package to your project and it is not showing the .NET Framework v4.0 as a target framework, you may need to check your project settings to make sure it is set up correctly.
To do this, open the project properties in Visual Studio, and under the "Application" tab, make sure that the "Target framework" drop-down list is set to ".NET Framework 4" or ".NET Framework 4.0".
If you are still experiencing issues with your project, you may want to consider upgrading to a newer version of the .NET Framework, as the v4.0 has reached end of support and may not be fully compatible with the latest version of Visual Studio.