Remember that a gift is no less a gift simply because it's conditioned on obedience. We never earn our salvation; it's always a gift from God. The verse, the scriptures say there's no condemnation for those who are in Christ. But the point is we have to remain in Christ. That verse doesn't say we can, we cannot lose Christ, only that there's no condemnation as long as we abide in Christ, just as what Jesus said there in those verses from John.