First of all: Flat sprinting is not going to be as effective as steep uphill sprinting. You are trying to train the very specific ranges of motion involved in uphill running. Gravity is the important loading, like adding more weight in bar bell.
Here’s the next best things if you can’t find a 20% grade. Wear a harness and drag a tire. You might have seen the picture of Steve House doing hill sprints on road dragging tires in p231 of Training for the New Alpinism. That road was only about 10% so we added the resistance. Notice his body position and hip flexion. It looks like he’s on a steeper hill.
Next is to use a weight vest. Not quite as effective but better than trying to do these on a 6-7% gradient trail.