Yes, dealing with distance (or area) in unprojected latitude/longitude coordinates is fraught with peril. The length of a degree of latitude is always the same (60 nautical miles), but the length of a degree of longitude varies with the cosine of the latitude.
To do it properly, you want to project your coordinates into some plane coordinate system and do your comparisons in that. (Which plane coordinate system should you use? Not a simple answer, depends where on earth your stuff is.) Geotools must have a library for that, or since you're working in java, check out proj4j.
Alternatively, it's kind of a hack, but if all you are doing is calculating straight-line distances, you could create sort of pseudo-coordinates in meters where y=latitude60cf (where cf is the conversion factor to get from nautical miles to meters) and x=longitude60cf/cos(latitude). You're assuming a spherical earth, which it isn't. And it will severely break down if your distances are very big. But for 500m it ought to work. If you do it this way it might just be easier to calculate distance yourself, using d=sqr((x2-x1)^2 + (y2-y1)^2)).
Better would be to use Vincenty's formula, which doesn't assume a sphere. Poke around for that, you may find a library that will do it.