I wanted to know the same thing yesterday but the 2 forums with this question had no answer on how to do it. So I spent a bit tryna figure it out. Figured I may as well pst here.
If you go into creative mode and hit " ` " You'll enter World Edit mode.
From there look through the buttons on the left until you see the "Eraser" tool. Select it.
At the top you will see several options for the selected tool. Change "Mode" to "Replace Selected Block".
Set the size to whatever you like (or whatever your PC can handle)
Every Left click will now clear blocks of the exact same type from the specified size of area. allowing you to destroy the top layer of grass blocks, then the soil, then Stones. until you only see the exact blocks you want to see in a designated area.
I used this yesterday to check out how often High Quality Soil occurs naturally, as well as the placement of ores in various places around my world.