This isn’t a million miles away from being a scriptural quotation, but it’s really a paraphrase. In the Dhammapada chapter on “The Thousands,” verses 103–104 include the following:
103. Though one may conquer a thousand times a thousand men in battle, yet he indeed is the noblest victor who conquers himself.
104. Self-conquest is far better than the conquest of others. Not even a god, an angel, Mara or Brahma can turn into defeat the victory of a person who is self-subdued and ever restrained in conduct.
“To conquer oneself is a greater task than conquering others” presumably corresponds to the beginning of verse 104.
In Pali this is “Attā have jitaṃ seyyo yā cāyaṃ itarā pajā.”
And in very literal English that’s “Oneself (attā) indeed (have) conquered (jitaṃ) better (seyyo) than (yā cāyaṃ) other (itarā) beings (pajā).”
There’s nothing there about a “task,” but the quote in question is a reasonable paraphrase: not fake, but not a strict translation. Somewhere between genuine and fakeish.