Deny location based access to nodes
Option 1

I use the Geofield module, which provides a similar function to the Location module.  It provides the concept of a proximity filter.  This allows you to implement views such as "show all nodes within 50km of specified point".  I don't know whether the Location module has a similar function, or whether you might be willing to change modules.  The Smart IP module claims some Views integration but D6 only, so you might need a bit of code to integrate with views.

This approach would not use access control at all - so that if the user specifically navigated by URL to a far away node, they would still see it.

Option 2

If you definitely want access control, then I think you will have to give up exact distances.  You could divide your target area into regions, maybe around 50-500 of them - most simply using a simple grid.  In your hook_node_access_records, you decide which regions are close enough to the node (calculate distance to the region centre).  Finally in hook_node_grants, you need code to take the output of the Smart IP module and calculate which region it is in, and set the appropriate grant.

If you need some more help with the details of either approach, feel free to edit your question to say which approach you prefer, what you have working and where you are stuck.