It's easier to concentrate on the task at hand when you have set aside specific times for your other tasks. Write down all of the academic tasks you have to do, breaking them into their component smaller steps wherever possible. Every weekend, make a realistic plan for the upcoming week. Every night, make a realistic plan for the next day. Don't make your plans too ambitious, or you will always be failing to get through your list.
Success feels better than failure, so plan accordingly.
So you get organized and you set up a schedule, but you keep avoiding your work and finding other things to do. Re-visit your motivations . Remember, the current task is related to the course, which is related to the program which you chose, which is related to larger issues of what you want in life. You don't have to have everything figured out, but remembering the big picture can help you get going. Develop a sense of progress.