To continue with a task or activity despite pain, difficulty, or lack of motivation.
"Even with a terrible cold, she soldiered on and completed the project on time."
We shall not flag or fail. We shall go on to the end.
— Winston Churchill, speech to the House of Commons, June 4, 1940 (captures the same spirit as 'soldier on')