All sound advice on mechanical checks, saddle height & gearing as a starting point - but bear in mind that it does hurt, especially when you're new to cycling.
So, assuming you've ruled out mechanical issues and got your saddle height sorted...
It took me the thick end of 12 months to 'get over' the burning pain of the first couple of miles of each ride, but once over it, it's all jam. As mentioned elsewhere, get your cadence (pedal RPM) up by using a lower gear, avoid grinding in a high gear at 60 RPM. Aim for something like 80-90 RPM, you can roughly count this in your head as you're pedalling.
As regards your actual measured speed, how are you measuring it? GPS data on your phone using Strava? Bike computer?