Your Visual Studio Version is not up to date. You need to update it.
Visual Studio 2017 15.9 uses .NET Core 2.1 SDK by default after the workload is installed.
To update Visual Studio to use .NET Core 2.2 SDK:
Install the .NET Core 2.2 SDK.
Reference
PS: You need to restart visual studio. After you the installation of .Net Core 2.2 SDK.