Please make sure your project has Xray's "Test" issue type and its associated screens are configured properly. This is done automatically if you followed the Quick Setup instructions.
If you added Xray's issue types by hand to your project or if you changed the screens/screen scheme configurations, then you may need to perform additional configuration operations.
Please check multiple examples in the tutorial Examples using Test Case Importer (as well as code in GitHub).
Importing Test Cases
Xray provides the ability to import multiple test cases at once either as a standard user or as a JIRA administrator; there is no limit on the number of tests that can be imported.