With the way you have it set up at the moment, when handleGameResponse is called and gets to the getJSON part, it will
call getJSON and pass the function you’ve provided as an argument, but still continue on with the var shouldEndSession = false; callback(session.attributes,buildSpeechletResponse(header,speechOutput,repromptText,shouldEndSession)); as none of the code in the function you’ve passed getJSON gets executed until after it receives a response.
Using .then requires a promise library, or modules that have it built in, I would recommend getting a good understanding of the program flow and callbacks first. You also should be careful of where you’re declaring your variables. for example say the getJSON works but the data is an error, then you have the issue that your callback(... function is being passed arguments that haven’t been declared, as only speechOutput has been declared in that part.
What you might find easier to manage is as regardless of success or failure you’re using the same variables speechOutput, repromptText, header etc…, you could initialise them at the start of function, even just var header = '' and then later in the code you can simply do header = "Invalid Game"; and not have to usevar` to declare it each time, and will also ensure that undefined variables aren’t trying to be passed to anything.