Not necessarily the wrong program, perhaps just not fully understanding how it works.
Typically programs are associated with the airline and their partners. In the case of Air Canada/Aeroplan, the only carriers you can earn on are Star Alliance carrier. There are a few exceptions to this rule.
Similarly with your AY flight, you could credit this to multiple airlines, most of them would be OneWorld affiliated.
What type of travel do you typically do - perhaps some of the wiser people on this forum could suggest alternatives.
You can find Aeroplan's partners here:
https://www.aeroplan.com/earn_miles/...OurPartners_EN