I wonder if these two sentences mean exactly the same, or is there any difference?
Logically, they mean exactly the same thing.
But in practice, thy have a slight difference.
If someone is being negative, feeling that they can't accomplish what they want, you would respond with something that matches their mood: "nothing is impossible". You deny their negative attitude with another negative.
But if someone is being hopeful about what they want, but with doubts, you would respond with something that matches their mood: "anything is possible". You encourage their positive attitude with a positive statement.