You can simply use the Dijkstra Algorithm for pathfinding in tile maps since they are just bidirectional graphs where each tile is a node and adjacency of tiles is adjacency of nodes in the graph.