I just had the same issue. There are two ways that I heard to lower nitrates: water changes and chemicals. I went with water changes.
I was doing 15-20% weekly water changes and only maintaining the nitrate levels. After doing (2) weekly water changes at 40-50% each, my nitrates dropped from 40ppm - 5ppm. I now do 15% water changes to maintain that.
I was also informed that in a pinch, there are chemicals you can buy that will lower nitrates. People on here verified that it does work.
I'd go with a couple 50% water changes and see what happens.