Jesus said this in Luke 13:24. He was not referring to salvation by works. He is speaking of ardent desire evidenced by a search.
“agonizesthe—"Be in an agony; strive as those that run for a prize; excite and exert ourselves to the \ utmost."
“Those that would enter in at the strait gate must strive to enter. It is a hard matter to get to heaven, and a point that will not be gained without a great deal of care and pains, of difficulty and diligence. We must strive with God in prayer, wrestle as Jacob, strive against sin and Satan. We must strive in every duty of religion; strive with our own hearts…”