I agree with the prior answerprior answer, but have some further points on the relationship between programming and astronomy, and on the community college route.
If you wanted to do paid, supported research in computer science, you would need a PhD just as much as to do paid, supported research in astronomy. A PhD is the easiest way both to learn to do research and to demonstrate that you can do research. Programming in itself is different because it is a practical skill distinct from research.
After retirement, I took a community college Latin 101 course just for fun, and I volunteer with a community college robotics group. The good news is that you will have some bright, motivated, fellow students. The bad news is that you will meet some students who are just going through the motions, and are not really trying to learn.
You may find some of the courses you have to take boring, but you are presumably more mature now than when you were in high school, so you should cope better. Aim to do work at a much higher standard than is demanded for the course. That will help you concentrate, and equip you for transfer to a four year school.