For a graphically-simple game for someone unfamiliar with game dev(but familiar with Java), I'd recommend Unity in 2D. There are a ton of pieces in its API that are JFM(just fucking magic) such as scenes, UI, and prefabs. If you advance past "babby's first" tier, you'll quickly identify the limitations with the built-in tools and likely learn to hate how much you'll be forced to use the editor(rather than source code) to accomplish certain tasks.
If you don't want to use proprietary software and are willing to pick up python, I'd recommend pygame. It's not as much a 2D game engine as it is a convenient way to use SDL with python. If you know how you want to approach your game's architecture, this will allow you far more flexibility to make it happen without ever touching Unity's editor.
There's a world of other game engines(Godot, gamemaker, etc) that you could pick up if you wanted to start learning, but I've only got experience with the ones I recommended.