That will still work - the distance to is to specific points on the object surface, and you would just need to set how far that "distance" is, in this case very small values. Doesn't matter that the one water plane spans the whole geometry, each point on the land geo will measure distance to nearest point on water plane (also doesn't matter that it's all one material, the distance shader returns a unique distance for each point on the land geo).
EDIT - looks like you just need to edit the Near and Far values to account for the small range you want it to cover :)