Hey,
No, you are not too old to learn programming. If you wonder if you are too old to become a professional software developer and are under the age of 50, the answer is still no. Programming is one of these things that no matter how old you are, if you get good at it, nothing can stop you. A lot of it is done remotely, so people won’t even know how old you are unless you tell them. And even if you do tell them, your age and past experiences will work in your favor - you can always turn them into advantages.