Apostle Paul was declaring in 2 Ti 4:7 that he has completed the assignment that God called him unto. He remained faithful to the call upon his life and finished his race. Paul also referred to fighting the good fight. This was a reference to all the temptations that he faced to quit, be distracted or to run another race entirely.
You see you will always face potential distractions on the path to fulfilling your God-given purpose. These distractions will attempt to derail you. In order to be able to declare success as Paul did, you must be committed to our purpose irrespective of the situation and the environment.
Fill yourself up with the Word to strengthen your spirit man, and allow the Holy Spirit to guide you. As you do these you will be able to resist every attempt to distract you off your course. Then at the end of it all you will say, “I have completed my assignment on earth”.