Noise-resilient quantum interface based on quantum nondemolition interactions