I found https://extensions.xwiki.org/xwiki/bin/view/Extension/Import%20from%20TWiki%20Python%20Script but I can’t tell you how good or up to date it is given its last release date…
If it does not work well enough and you want to try to implement one there is a new conversion framework (it’s not that new now but more recent than this extension) which make much easier to write importers, you only have to write a TWiki input and generate standard “events”. You can take a look at the following existing input filters for inspirations:
- dokuwiki/dokuwiki-text at master · xwiki-contrib/dokuwiki · GitHub
- mediawiki/mediawiki-xml at master · xwiki-contrib/mediawiki · GitHub
- confluence/confluence-xml at master · xwiki-contrib/confluence · GitHub
The complexity will depend a lot on the complexity of the twiki format (parsing Confluence format was a huge pain while mediawiki is pretty simple).
Another possibility is to ask to one of the companies sponsoring XWiki, for example XWiki SAS (and to be precise me as employee of XWiki SAS in this case) wrote the MediaWiki and the Confluence input filters.