Not sure about CTF, but for competitive programming C++ and/or Java would be recommended but you don't necessarily have to start with those. The biggest programming competition is the ICPC for university students and it is restricted to C, C++, Java and Python. The other big competition is Google Code Jam which supports basically any popular language that has an open source version, you can get involved in Code Jam before uni I believe but just check there's not an 18+ requirement. For a high school student, there's also Olympiad which is big but I wasn't involved in that so can't elaborate anymore.
For ICPC, C is not really a practical choice and solutions that don't time out for Python are not guaranteed so it's also not a practical choice if you want to get good and competitive. Between C++ and Java, C++ has faster run times which can be the difference between a time out and getting a question right. As a result, basically all the top teams use C++.
But if you haven't started programming much yet, Python is a great choice. I'd recommend checking out Grok Learning and their NCSS challenge - the challenge and also the NCSS in general is also great even if you're not a beginner - i'd highly recommend applying for their summer school, but i'm not sure how COVID affects it. UNSW also run ProgComp for high school students.
There's a lot of sites to practice competitive programming like Codeforces, HackerRank, CodeChef and Project Euler. LeetCode is also very glossy and popular, but it's intention is more for preparing people for technical interviews rather than competitive programming.
This book, Competitive Programming is highly recommended and is aimed at both Olympiad and ICPC competitors. I haven't checked it out, but there's also a Coursera course from one of the St Petersburg universities (two unis there are very strong at ICPC).