John is speaking from a legalism standpoint not differentiating between Grace and Law as Paul does. We can`t do righteousness. We are righteousness by virtue of the HolySpirit being in us and us in Him.