Method and device for measuring a distance to a target in a multi-user environment by means of at least one detector