2 John 1:9

Everyone who withdraws and does not remain in the doctrine of Christ, does not have God. Whoever remains in the doctrine, such a one as this has both the Father and the Son

Other versions

King James Version

Whosoever transgresseth, and abideth not in the doctrine of Christ, hath not God. He that abideth in the doctrine of Christ, he hath both the Father and the Son.

English Standard Version

Everyone who goes on ahead and does not abide in the teaching of Christ, does not have God. Whoever abides in the teaching has both the Father and the Son.

New International Version

Anyone who runs ahead and does not continue in the teaching of Christ does not have God; whoever continues in the teaching has both the Father and the Son.