How to package the game with Server Target setting?

You should use the solution provided by IncantaGames instead and the file for that is located at /Engine/Source/Developer/DesktopPlatform/Private/PlatformInfo.cpp