The First Epistle of John was written by the writer of the Gospel of John. He was deep in the experience of being a Christian. He develops and continues theological themes put forward in his gospel.
This is not a statement on which was chronologically written first. This is a proposal of mine that First John is a subjective and experiencial continuation of truths presented in the Gospel of John by the same beloved disciple John.
His epistle is a road map to help the believer in Christ into a deeper experience of the indwelling divine and eternal life that they have received.
John's writing is divine and mystical. It is experiencial and subjective. But it is coherent and fascinating to the seekers of the truth.
Now why don't you think it is John who continues his thoughts in the First Epistle of John, which he put forth in the Gospel of John?