Quantum phase flip gate between distant nitrogen-vacancy-center ensembles coupled to superconducting flux qubits