This is a very deep and complex question of the type of Christology that was hotly debated and even resulted in battles during the first three hundred years of Christianity. How divine was Christ? How human? 50/50? 100 percent of both?
Did Christ have one nature, or two? One will, or two?
I think the answer begins to clarify itself somewhat when we consider the purpose of the Incarnation. Why did the Word become flesh? Why did Jesus Christ come into our world, born as a baby tabernacling in human flesh (John 1:14) God in the flesh?
If the answer is that it was necessary for our salvation, then we realize that this was a special circumstance, where He took upon His divine nature, what He was not originally, by nature... human nature. He emptied Himself (kenosis) divested Himself of His divinity on some level to accommodate our humanity so that He could "taste death for every man." Hebrews 2:9
In Philippians 2:6-8, we find that He "Who, existing in the form of God, did not consider equality with God something to be grasped, but emptied Himself, taking the form of a servant, being made in human likeness. And being found in appearance as a man, He humbled Himself and became obedient to death—even death on a cross.…" How would this affect Christ having two wills?
Because it was necessary for our salvation. Christ Jesus came into this world to save sinners, and to do this He needed to obey God by faith, in human nature, exercising free will, not as a lesser god to a greater God, but as a man. But not just any man... God in the flesh, willingly laying aside His divine power, in order to condemn sin in the flesh (Romans 8:3,4)
I remember feeling confused once when studying Hebrews 10:5 because it says "Therefore, when Christ came into the world, he said: 'Sacrifice and offering you did not desire, but a body you prepared for me...'" it was confusing because it is certainly quoting from Psalms 40:6 but it appears at first to misquote it! The Hebrew original states "Sacrifice and offering You did not desire, but my ears You have opened."
How can these two be harmonized? It becomes clearer when we realize the purpose for which He came in human nature was to save humanity. The body prepared for Christ, was that of a servant! The "open ears" in the verse are not only open to hear and obey (compare the Hebrew Sh'ma - to hear and Shamar to obey) but his ears were symbolically pierced... The Aramaic translation of Heb. 10:5 says, “Sacrifices and offerings you did not want, but you have clothed me with a body" and Smith's literal translation and the Douai-Rheims correctly translate Psalms 40:6 as referring to ears that are "pierced" as Exodus 21:6 says was to be done with a servant or slave.
What does all this have to do with Christ having two wills? Everything! it was a temporary and necessary arrangement both in his obedience throughout His life and for His willing death on the cross. His human nature shrunk from the trial, and so He got the victory by praying, "Not my will, but thine be done."
That is why Psalms 40:7 & 8 says, Then I said, “Here I am, I have come—it is written about me in the scroll: I delight to do Your will, O my God; Your law is within my heart.” He made the choice to take on our human nature and human will, and by faith He obeyed as a man, so that we could have His victory. He took our human nature, and our will, so His victory can be ours. If we surrender and pray, "not my will but yours be done," we may have the mind of Christ. Therefore, it not a problem that He had two wills... it was the plan... The plan of salvation.