When you want to do a given action repeated times, you can do it like rechronicle wrote above. Before undertaking the action (in this case: move to one adjacent tile) check a variable (number of moves), and after the move reduce that variable by one. At some point, e.g. next turn, you need to fill it up again. You likely have a “new turn” global event which could be used to trigger the refill.
The complicated part comes from “previewing all moves”, i.e. when the player can move the whole distance at once and needs to see the options. Even though it looks superficially similar, it’s a different implementation.
I would probably test out something like this:
1) check if a simple “distance” check methods works, look for distance actions and rays.
2) if not, look into tile based pathfinding to determine possible moves.
3) if all fails, custom: starting tile can set eligible adjacent tiles into an accessible state. Activated are tiles that can be moved on, and which are not yet set to accessible. The accessible tiles learn each which tile has activated them, and reads a int variable (representing distance), and adds one to store in themselves. This value is checked against moves, and if it exceeds them, the tile does not activate the next tile. The tile the player is on is 0. The adjacent ones have a 1, the adjacent to the adjacent ones a 2 and so on. You can then also use the value to e.g. colour the tiles, of use the value for gameplay.