Effects of a close encounter with Jupiter on different populations of planet-crossing objects