It depends a bit on how your setup is...if you need to get the distance over and over you could build a voxel grid and assign each point to a specific voxel in space(2d or 3d). Then when you lookup the points close to any given point you only need to check the points in the surrounding voxels (If you don't find the wanted amount you may have to check the next set of voxels). If you are unfamiliar with voxels you can simply think of it as slicing up the space into box volumes(3d) or rectangles(2d).

When points change position you can assign them a different voxel ID.