There is much bad teaching about the “will of God,” regarding prayer and faith, and so I do not fault you for being confused and looking for direction.
Due to the large volume of bad teaching on this I could write a book about it. However, for brevity I will say a few generalized things, and then address your specific question about Jesus’ prayer.
1. The term “will of God,” can either mean, “God’s sovereign decree or control (etc),” or it can refer to God’s commandments and precepts. These are vastly different subjects. The context will determine this. Thus, make sure that you do not have confusion about this because you are making a category fallacy by mixing this up with specific passages. Even seasoned theologians make this mistake.
2. When it comes to healing and faith in prayer, the bible, almost never, and referring Jesus, NEVER refers to the “will of God.” Instead, the reference is to the “will of man.” This is the main hilltop the bible address. Jesus never said, “according to the will of God,” you are healed, or saved from sins. Jesus kept saying things like, “your faith has saved or healed you.” Your faith to be healed is about your “will” to be relieved from this pain and to feel better. Jesus says it is your faith (your will) that heals you, not God’s.
3. When we address God specifically in prayer to ask for things, we relate to Him on the issue of the “will of man,” because this is how God has relationship to us. Of course, we are never to forget the sovereignty of God and His decrees, but we do not directly talk to Him and receive from Him on this level. Jesus said, if “you” seek, the “you” will find. If “you” ask, then “you” will receive. Jesus said if His words abide in you and you in Him, “you” will ask whatever you want and “you” will get it. This “will of man,” or the human level, is how God has “direct” relationship or fellowship with “you.” The super prophet Isaiah told king Hezekiah that he was going to die. This was obviously God’s will because God said it, or is God a liar? Even if God is testing, God does not lie. King Hezekiah, did not have direct relationship with God by saying, “This is your “will,” so I accept this.” No, he asked God to have mercy on him and heal him. Hezekiah had relationship with God on the foundation of “the will of man.” God accepted both his relationship and faith, and God added 15 years back to him.
About your specific question when Jesus prays, “not my will, but your will be done.”
One is the context. Jesus is already in a formal contract and agreement with the Father for ministry. Most of us are NOT in this context. Let that sink in. The apostle Paul, was in this context. The Holy Spirit said he would go to specific cites to preach and would suffer. Paul accepted this ministry call from God. After Paul accepts this ministry, he is not “free” to leave. He gave God his word or vow, and so he must fulfill it. Thus, you read Paul in end of Romans saying, he wants to go to Spain, if “the Lord wills.” In context of his specific ministry call and the things he has promised to do for God in ministry, this makes sense. If going to Spain was not part of the original call and agreement, then Paul can only ask if God would make an amendment to the original agreement. In this type of “context,” God might or might not. The same for Jesus. Jesus has already agreed to do the “will of God,” (sovereign plan of redemption). In this context it makes sense to say, “if there is a way to change the contract so that I do not have to go through this, then do so, but since I have already agreed to this, I will do it no matter what.” In essence, Jesus ends this prayer in a prayer of dedication, so that the prayer as a whole, is based on “dedication,” with a particular point, “if there can be an amendment to the contract.” The next point will show the significance of this. Most of us, and even many in ministry are not in these types of binding agreements with God. And thus, in this alone, Jesus’ prayer is not applicable to the vast majority of all types of prayer. The fallacy people make here is to take a particular type of prayer and context and apply it in a general way.
This is obviously not applicable to normal everyday troubles, where God explicitly gives many promises that He wants to answer the prayers of the “will of man,” to be helped, healed and blessed.
Second. Prayer has 2 basic mode types. One is a prayer of dedication and other is petition. (Even praise could be categorized as dedication). If you do one type, you cannot do the other. They exclude the other. You either do one or the other.
Dedication is asking God for His plans and will to be done.
Petitions is asking God to do you plans and will.
It is true that sometimes we have overlapping desires. In our human relationships, even if there is mutual desires, if we want to be “sincere,” for example in buying a gift for a family member, we will do all we can to buy the gift we know “they” want, and not us. Therefore, if you are to be “sincere” with God in prayer, you must either do a dedication prayer or petition type prayer, and not mix them up. People will mix them up and play the part of a hypocritical Pharisee. They asked God to bless their will, but, in order to appear more humble than they are, will reverse their petition prayer into a dedication prayer by saying, “if it is your will.” Logically, such a prayer is not even a prayer, because the contradictory prayers cancel each other out. Its like saying this to your husband, “I bought this dress for me, but not my will, but yours be done, therefore, this dress is for you.” Not only does it not make since, it comes across as false humility.
You do not need to manipulate God like this. Pray with clarity and to the point. If you dedicate something like praise, or time, money or hard work to God’s will and desires, then let it be just that. If you are asking for God to bless your will and desire, then let it be just that.
God’s will and plan is to bless your will and plan, when they are asked in sincere faith, in accordance with God’s promise. Because God gave promises to bless us, we know that God has already convinced Himself to bless our will and plans. He wanted this. If you have faith, the Father will give you what you ask. He wants to bless you. He likes faith. God does not like convoluted, contradictory, manipulated and false humanity prayers.
Asks and receive. It really is that simple. God likes this.
 This phrase and focus of the “Will of man,” by Vincent Cheung, from his essay, “Healing: the Will of Man.”