You can import the project as a maven project. Reimport option is also available, all the above answers will help you achieve this. I was facing the same issue. I had fixed this in the past. Being new to the Intellij ecosystem, I was not able to understand the exact problem.
What seemed like a java module/project was the package structure. I found this dropdown on the top of the project sidebar, which helped me change the view back to the maven project.