There are several ways to export content from AEM. Let me list some of them:
@asutosh_jenaalready mentioned the .infinity.json selector+extension that exposes the content structure in a JSON format. It will list the whole content hierarchy with all subnodes. Be aware: depending on the size of your content tree you may want to split the query for certain subtrees of the content hierarchy and not just query the root node.
You can build a CRX content package of your content. If you unpack the resulting ZIP file you will find a folder structure and .content.xml files representing the content hierarchy.
You can use the VLT tool to check out content from your repository.
You can also check if AEMs JSON Exporter can support with your requirements.
That being said, in my experience migrating from one CMS to another usually comes with some kind of transformation and restructuring of existing content. Sometimes it is even easier - and can support certain business goals - to create new content from scratch instead of migrating the old. Personally, I've never seen a 1:1 migration of content between different content management systems. I don't have a background on Contentful but for many systems you will be facing a completely different approach to content hierarchy and/or storage and it may be a very tough job to do a purely technical migration.