You do not understand what the word means. In John 1 it says this:
“do not let anyone lead you astray. The one who does what is right is righteous, just as he is righteous. “
That doesn’t contradict what the Bible says elsewhere, and you are truncating and taking 1 John 3:7 (rather than John 1, which would refer to the first chapter of the Gospel of John) out of context; verse 8 makes it clear that this is about Christ working in someone’s life, and as Matthew 24:13 makes plain, one must “endure to the end” to attain righteousness.