In the previous verse (verse 17), John tells us how to have confidence or boldness on the Day of Judgment. And in verse 18, he tells us how to cast fear out of our lives.
These are simply positive and negative ways of saying the same thing: getting rid of fear is the negative way of saying become confident. John wants to help us enjoy confidence before God.
He does not want us to be paralyzed or depressed by fear of judgment.