I don't think I am particularly talented, but I spent so much effort on this (learning how to write software) that I can say today that I am a mediocre software engineer. Again, just think about it. I spent 10 years on this. In the meantime I did everything that I could, being Linux admin, systems engineer, data engineer, just to keep myself running. Almost forgot, I never received any formal education in computer science.
My co-workers run circles around me when it comes to programming, yet my persistence helps me to outperform them.
I guess what I am trying to say is: - don't give up - expect success over time (1-2 years as a bare minimum) - try to start with a simple thing, as simple as it gets (QA, DevOps, anything where you don't need to flip binary trees on a whiteboard :) )
This was my story, I hope it helps.