Hopefully this helps you or someone else because I have struggled with this error in the past.
Here is the solution:
The Twimotion Program and the Unreal to Twinmotion Plugin you are using have to be compatible with each other.
For Example Twinmotion 2024 Datasmith Exports will NOT work with Unreals 5.3’s version of “Twinmotion to Unreal Plugin”. Only Twinmotion 2023.3.1.2 Datasmith Exports WILL. Any other version of Twinmotion Datasmith exports will not work with UE 5.3. (or rather you will not get any materials)
Twinmotion 2024 Datasmith Exports WILL work with UE 5.4 WITHOUT the datasmith Plugin.
Twinmotion 2022 or older didn’t have a datasmith exporter hence it is only compatible with the “retired” Twinmotion to unreal plugin in UE 5.1 (also worked with UE 5.2) as that version of Unreal allowed you to import a twinmotion file as a datasmith import.
I can only imagine the frustration people are having with all of these miss match of versions and plugins. hope this helps. Cheers.