Like people have said before, you need to place the spawner on grass and have light sources around it (either by putting it in the open or having like glowstone/torches etc). A good way of making a spot for your grinder is to make a 9x9 area of grass with fences on the edges and put the spawner...