You've got air in the system. If all you did was replace the line and fill the reservoir, keep pumping that brake lever. It may take an hour, working the lever several times and then waiting.
Of course, there is a proper way to bleed the air out of hydraulic brakes, but the above method will work. Use google to find out how bleeding works.
The trick is to fill the reservoir, as described, and hold the brake lever in as you crack the bleeder valve, You need a clear tube on you bleeder hose and an 8mm wrench to do this,
As you crack the bleeder with the brake lever pulled in you will see the pressure release, so be prepared to close the bleeder quickly, and then pump the brake lever again until you rebuild the pressure, and release the bleeder, and close,
As you repeat this process, watch the reservoir, so that it does not empty.
This is easiest with a helper, But it will get the job done fairly quickly,
Soon you will see fluid with air bubbles in the clear hose, you are almost done now,
Keep the reservoir full to the full line, Pump the lever, and hold the lever tight while you release the bleeder, and your fluid should now flow out, You have created the vacuum, so watch the clear tube for no air and the reservoir so it does not run dry, and close the bleeder when you see no bubbles or the reservoir gets low. Repeat if necessary.
Now, get a Strong elastic or strap and use it to hold your brake on tight with the reservoir lid off for a few minutes while you tidy up. Any air left will rise under the pressure and vent through the open reservoir. Place the cap back on tight with the rubber band or strap, holding your brake lever tight, and leave it on until you are ready to go. Your front brakes should be pumped up.
This can usually be done faster, than it took me to describe the process,
Enjoy the ride, and best regards,