Sorry, I haven't used GameMaker in years so I didn't realize it was no longer free. Godot and Unity are both capable of doing 2D games. You could also work from scratch if you want to be a programmer. You could use HTML5/Javascript, or you could use SFML + C#. If you use C#, then you'll also be learning a language which is used in Unity, so you'll expand your ability into making 3D games.
I'm just speaking from a programmer perspective though. If you just want to make games but you're not interested in coding, there's lots of "2D" game making toolkits out there.