Is radiation therapy only used for treating cancer?

No. There are other conditions and types of radiation that physicians treat. Example radioactive iodine for hyperthyroid patient. Keloid scars are prevented with radiation. Benign growths in various location are treated with radiation.
Mostly. Radiation is most commonly used to treat cancer but there are a handful of benign conditions (trigeminal neuralgia, acoustic neuroma, ateriovenous malformation, grave's disease, etc) that it is used for as well.