The range is extremly large. Any object detected will cause an alarm to go off once. If the object is very close, the alarm will loop until the pilot moves the ship in any direction.
Confirm your distance to the collidable objects as you approach, and be aware that 1 km does not mean you are very very close to the object, it means you've already hit it. Collision distance varies based on the size of the object.
Using "Space Trash " as an example, collision occurs around 60 km from the "trash".
The collision alarm can be turned off via a console command /disable collisionalarm. And can be re-enabled with /enable collisionalarm