There are many, many types of software engineering roles. Perhaps you are just applying to the wrong ones. Maybe you're not a good programmer? I can't say. But even if you aren't, that doesn't mean you can't be a good engineer. You mentioned sysadmin experience, so perhaps you could focus on a DevOps or SRE role?