It’s not a sin to avoid church under any conditions.
It is indeed a sin to avoid church for illegitimate reasons.
24And let us consider how we may spur one another on toward love and good deeds, 25not giving up meeting together, as some are in the habit of doing, but encouraging one anotherand all the more as you see the Day approaching. (Hebrews 10)
Not to mention all the commands about taking communion and how to do it, praying and worshiping together, serving together, and submitting to ordained leadership, none of which we can keep when home communing with ourselves.