I see no reason why the above code shouldn’t work. You can even drop the removeExtensionProvider, adding a provider will override the existing ones, and you don’t need to call getVersion, as it’s already done in a static code block within ProviderManager.
Yep, it appears that the DataFormProvider is hardcoded into the commands provider: Smack/AdHocCommandDataProvider.java at 64d134052dbd39a2933e3e7b4fe6a65bfa3cc1f1 · igniterealtime/Smack · GitHub
It should be changed.
But then again, if you need to replace the data form provider, then you are most likely doing something non-standard XMPP, which I don’t recommend to do. Why do you feel like replacing it?