I tried to import an SVG into After Effects but got an error stating that file format is not supported. Is there any way I can achieve this or is there any alternative solutions?
SVG isn't a supported image format, so there's not a whole lot you can do other than convert to a supported format. As long as you have access to Illustrator then the easiest option is to simply open and re-save as an .ai file. That will obviously retain the vector data so you can animate paths etc. If you don't have access to Illustrator and need to import it as a vector then you could try converting to another vector capable format such as PDF or EPS.
If you only need a still image then you could simply rasterize to e.g. a PNG, just make sure you rasterize the image large enough for your needs.
There may also be a third-party script or plugin that will import SVG for you. I couldn't find any but there are scripts that will export SVG, so it's a possibility.