To connect to an Atlas M0 (Free Tier) cluster, you must use Java version 8 or greater and use a Java driver version that supports MongoDB 3.4.
So make sure to download MongoDB Java Driver version 3.4 or higher and drop it to JMeter Classpath. You will also need to remove all previous versions of the MongoDB Driver to avoid Jar Hell. JMeter restart will be required to pick up the new .jar and unload old ones (if any)