Sources or online courses available for learning german (preferably free or low-cost)?

I’m a math/CS major who hopes to go in cryptography. I also have an interest in foreign languages (especially Romance languages) and am intrigued by linguistics.

I have to fulfill a 4-semester foreign language requirement at my university but don’t really have room to take a course. I am a heritage speaker for German and I placed into 4th semester German at my University, however, I don’t think I could pass the course if I took it since my German spelling, reading, and grammar are horrible. The person that administered the test said I could probably pass out of German if I learned the grammar on my own, but I am finding difficulty in doing so. I have particular issues with verb conjugations and determining gender of nouns, which is limiting my progress.

I’m currently using Duolingo to learn German and I don’t like the way its designed for German (which is odd, since I haven’t had a problem with it for French and Italian). Are there any sources or online courses you guys recommend that are really great for learning German? I’d prefer if they were free but I’d consider low cost courses too. I think I need something structured in order to succeed at this.

Thanks for any advice you have.