First, sit down with your boss and make sure you are clear on exactly what the deliverable is. Then make sure to put that in writing, get the boss to sign off on it and have a team meeting to go over the requirements with the team and do the initial task assignments. When the intern brings up what he wants to do instead of what you are tasked to do, then you tell him that is out of scope and move on.
Start having daily (yes daily) meetings on the project to discuss what was done the day before, what roadblocks they ran into and what was planned for today. I agile this is referred to as the daily stand-up meeting and should take only about five minutes per person on the team. If there are problems that need to be resolved with one or more team members, get with them outside the daily meeting. If he brings up his disagreement in the daily meetings, catch him immediately after the first one where he does this and tell him that is unacceptable professional behavior. The next time, don't wait until the end of the meeting, tell him directly that the subject is closed and that he is not to bring it up again.
In those meetings, you can make sure tasks are assigned when people are done the previous tasks and that progress on the assigned tasks is being made.
Set up a system of code reviews where all completed work is reviewed by someone else and they check that work against the requirements. This will help prevent the intern from going off on his own direction unnoticed. You might make sure to do the first couple of code reviews of his work to make sure he is following directions.
If he continues to text you about it after you have clearly and unambiguously told him that it is out of scope, point out to him that the decision is made and you expect him to stop texting you about it. If he still continues or if he decides to ignore you and do what he wants anyway, discuss the issue with the person who is his official boss for guidance on how to handle.