Only NeoGPS will parse data from the the newest GPS devices, like the NEO-M8. It's also smaller, faster and more accurate than all other libraries.
Your sketch is similar to the NMEAsimple.ino example of NeoGPS, with the addition of the UBX 10Hz update rate command. You could also try the example ubloxRate.ino. It shows how to send other UBX commands for 1/5/10/16Hz update rate, different baud rates, and enable/disable sentences.
If you want to try it, NeoGPS is available from the Arduino IDE Library Manager, under the menu Sketch -> Include Library -> Manage Libraries. Even if you don't try it, be sure to read the Troubleshooting page for other tips for GPS sketches.
I would also suggest NOT using SoftwareSerial. It is very inefficient, because it disables interrupts for long periods of time. This can interfere with other parts of your sketch, or with other libraries.
Instead, use AltSoftSerial on pins 8 (to GPS TX) and 9 (optional, to GPS RX through resistors). It is very efficient... Strongly recommended!
2nd best is my NeoSWSerial on any two pins (5 and 4 are ok), but only at baud rates 9600, 19200 and 38400.
And because you are sending commands to the GPS device, be sure to do some kind of level-shifting. The 5V Arduino pin can damage the 3.3V GPS RX pin. Read more about it here.