Then the lawsuit brought by the Church should have made a claim about being able to perform a man-woman Religious Marriage without a Civil License being issues. That would be a valid claim that the law is infringing on their ability to perform a religious ceremony without government intervention.
However the law does not prevent them from performing a Religious Marriage for a same-sex couple so the law in fact does not limit their ability to perform that ceremony.
§ 51-7. Penalty for solemnizing without license.
Every minister, officer, or any other person authorized to solemnize a marriage under the laws of this State, who marries any couple without a license being first delivered to that person, as required by law, or after the expiration of such license, or who fails to return such license to the register of deeds within 10 days after any marriage celebrated by virtue thereof, with the certificate appended thereto duly filled up and signed, shall forfeit and pay two hundred dollars ($200.00) to any person who sues therefore, and shall also be guilty of a Class 1 misdemeanor. (R.C., c. 68, ss. 6, 13; 1871-2, c. 193, s. 8; Code, s. 1817; Rev., ss. 2087, 3372; C.S., s. 2499; 1953, c. 638, s. 1; 1967, c. 957, s. 5; 1993, c. 539, s. 415; 1994, Ex. Sess., c. 24, s. 14(c); 2001-62, s. 7.)
It's legal for "children" to get married now, in New Hampshire I believe it's as young as 13 - in North Carolina I think it's as young as 14. That for current different-sex marriages. Now that usually takes (a) parents permission or (b) an affirmative response from a Judge, but they can still get married.
Already did. 51-6 is the section of the law that defines the illegal action. 51-7 is the penalty for violating 51-6. To violate 51-6 it must be a minister marrying a man and a woman.
If they perform a Religious Marriage without a Civil License for a man and a man or a woman and a woman, they haven't violated 51-6 so the penalty described under 51-7 does not apply.