According to Destructoid, it is not a real game.
At the time, the game looked awesome and I really wanted to play it but, sadly, the game never actually existed
However, there is a Flash game linked in that article that resembles the game from Big.
Twenty years later, BoMToons has sought to remedy this situation by creating a little Flash game which very closely resembles the one seen in the film. There isn’t a whole lot to it, as there was very little to work with from the source material (which consists of one room in a cave and one text command entered). The game, called The Cavern of the Evil Wizard, takes place entirely in that one room and is solved in exactly the same manner as in the film, but there are a few other commands in the text parser that you can play around with.
Source : Link , Question Author : McKay , Answer Author : Michael Herold