Matthew 21:21
Jesus replied, “Truly I tell you, if you have faith and do not doubt, not only can you do what was done to the fig tree, but also you can say to this mountain, ‘Go, throw yourself into the sea,’ and it will be done.
Mark 11:23
“Truly I tell you, if anyone says to this mountain, ‘Go, throw yourself into the sea,’ and does not doubt in their heart but believes that what they say will happen, it will be done for them.
It says nothing about a need to abide by God's will. The examples of the fig tree and the mountain in the sea seem to be arbitrary and pointless - well they just show a display of miraculous power.
Note in the second verse it says "if anyone"..... it doesn't say anything about them having to be a follower of Jesus, etc. He could have said to his disciples "if any of you"....