Here is Alma’s clear confession of the nature of his sin.
Notice that it is not specifically fighting against “the church,” but very specifically rejecting his Redeemer. Alma had fallen into the same religious trap that had previously held his father when his father was a priest to Noah. His father had broken free of that trap through the words of a prophet, and had gone on to become a powerful voice for the Savior he had once rejected. Now his son treads the same path. Through the medium of an angel he has also come to understand the truth of the coming atoning Messiah, and he too will use this pivotal experience to become a mighty servant of the Lord.