Having really good click-to-move movement is actually a little bit advanced.
There’s simpler solutions (like what BP posted) but when you start needs to go around complex structures (like a floor plan in a building, a hedge maze, etc), you’ll have to learn how to do pathfinding, and have the character create a path to the destination. Then mixed with that, you implement something like what BP posted to generate “way points” to walk to.
There’s about 50 million ways to do it though. What I do is build a path, then I tell them to walk from one tile to the next on a grid until they reach the destination tile.
But, pathfinding is a advanced topic, I wouldn’t recommend even trying until you get some basic movement down (again, like what BP showed you).
Here’s a super basic movement system that moves an entity from one tile to the another. It’s pretty similar to BP’s (Almost identical really), just written a little differently. Might help to give you multiple perspectives on the same problem.
protected void walkTo(int destinationX, int destinationY) throws SlickException{
if (entityY > destinationY){entityY -= speed;}
else if (entityY < destinationY){entityY += speed;}
else if (entityX < destinationX){entityX += speed;}
else if (entityX > destinationX){entityX -= speed;}
}