OK I hid your other question and will post a detailed answer here (you were right).
You said you taught the TM to a Torterra. Assuming it's male then you're good to start.
Torterra is Monster+Plant so breed with anyone in the Plant+Fairy groups (who can also learn energy ball). This is: Hoppip, Skiploom, Jumpluff, Shroomish Breloom, Roselia, Roserade, Cherubi or Cherrim.
You need them to be female in order to breed with Torterra. Then breed until you get a male baby. They are all 50/50 so it won't take long.
Next you need to breed your male Hoppip/Shroomish/Cherubi etc with a female Castform, who is in Fairy+Indeterminate. Again, make sure to get a male one.
Then breed with a female Gastly/Haunter/Gengar to get a Gastly that knows Energy Ball!!