If Christ is the way to salvation, why does it matter what religion you are as long as you live as Christ did? In other words, why would God condemn someone who does everything Jesus called him to do just because he worships differently?
First, nobody lives as Christ did. Christ was sinless; we are sinners. That’s the point behind why he came–to save us from our sins.
If someone does everything Jesus calls him to do, then he will–among other things–believe in Jesus and join his Church. Christ set up one Church for his believers to join. In Matthew 16:18, he says “I will build my Church,” not “I will build my churches.”
Of course, if you sincerely don’t know that Jesus said to believe in him and join his Church, then God will not hold you accountable for failing to do so. However, if you should know or do know that Jesus commanded these things and yet you refuse to do them, then you are not living in accord with the gospel and will not receive its benefit of salvation.
Worship and religious affiliation are part of what Jesus commanded his followers, and so what religion you belong to does matter.