Now this might sound like a weird question, but I cant help but wonder. Im sure that my lack of being able write stuff is from not knowing how to apply theory, but whenever I go to make something, usually my mind just gets hijacked by some song I heard that day or something. Does anyone have this issue? When people go to write a song, do they hear that song before they ever pick up the guitar and play around?
Yep. I've spent ages in the past trying to improvise, and all that came out was the wombles

I got round it then by going back to basics, and limiting myself to choosing 4 or 5 notes to use - so I physically couldn't play the wombles with them, then and came up with a rhythm, and a lick from that rhythm/those notes, then expanded on that til I was womble free.

Don't worry - its incredibly frustrating but also totally normal. Plus, if you can play a song you've got stuck in your head at least you can play by ear, so you'll be able to play your own stuff when you hear it in you're head.