John 14:23
Jesus answered, “If anyone (really) loves Me, he will keep My Word (teaching); and My Father will love him, and We will come to him and make Our dwelling place with him. One who does not (really) love Me does not keep My words. And the Word (teaching) which you hear is not Mine, but is the Father’s who sent Me.
If we love Jesus and keep His teaching, we will have fellowship with Him. Jesus will draw close to us as we draw close to Him in obedience and faithfulness to the Word. Sin and disobedience are a separation point from Jesus. We will not have fellowship if we choose not to love or follow Him.