Does the ground claiming system you describe work like this?
Green is claimed, blue is available to claim, and red is unclaimable/unreachable.
Spots become available if they are adjacent to claimed ground.
If this is the case, then I think this could be a possible solution:
Keep a list of the X/Y positions of claimed ground. (so you don't have to check the entire map)
Also keep a list of the X/Y positions of ground that is ready to claim.
Upon updating your map, run the list of claimed ground points through a function that takes them as parameters.
This function will check the neighboring tiles to the claimed ground. (x-1, x+1, y-1, y+1)
If the tile being checked is already claimed then do nothing, but if its unclaimed, change it to be available.
Store the X/Y of the available tile in the second list and use that for referencing where the tiles are. (you can also use this to pick the closest point to the Imps)
Lastly go through both lists and check if any points are in both of them. If there is a match, then remove the point from the available to claim list. (so that ground that is already claimed isn't mistaken for available to claim ground)
(you could also probably do some optimization to remove points from the list that have all 4 neighbors already claimed so you aren't checking them multiple times)