I have been playing electric guitar for 5 years and have pretty decent technique. I have a decent ear too (I'm still improving it). I listened to rock guitar virtuosos like Yngwie Malmsteen, Paul Gilbert etc, and I was influenced by classical composers, especially Bach from the Baroque period, my favorite period. Since I've encountered Bach's music, I have an ambition to compose something, for example Fugues. I know it's pretty hard.
For that I need to learn music theory (harmony and counterpoint). I can't read notes by doing solmization, although I know which note is it when i see the staff, but I am aware of many musical terms like intervals. I am 19.
Is it too late to start learning music theory and composing? I don't have any teachers, unfortunately. Is it possible to learn music theory on the internet and through books and be a self-taught composer?