When using traverse(), you automatically process all objects in the scene’s hierarchy. There is no need to additionally process the children of an object.
Besides, you don’t want to work with the local position of a 3D object. You should extract the position in world space and then make your distance test. You can use Object3D.getWorldPosition() for this.