The key to success in software development is your control over logic. Focus on programming techniques, problem solving and analytical skills. If you are someone with a science background then it is naturally expected of you to be good with logical thinking. Programming is an art of dividing a complex problem into smaller parts and troubleshooting those with good reasoning skills. If you are really good at it, you could well be on your way to become a successful programmer irrespective of your academic specialization.
If you are however not so good with logical thinking, never lose heart. Instead of looking at your weaknesses as flaws, you should rather try to work your shortcomings and turn those into your greatest strengths. Everything can be achieved through patience and hardwork. Give yourself a second chance. You can join some online classes or try online tutorials, just to find out if it suits you well enough.