I would prefer to keep it as a through axle but dont know how to take the centre out of the dynamo. Is there a way I can use the original through axle?
Your question is still obscure.
I see two axles in your hand. The one on the left is a quick release converter for a wheel with a 15mm through axle hub. Right?
The one on the right is a through-axle for a 15mm TA hub. Right?
You have a fork with drop-outs that take a 9mm axle with QR. Right?
You want to fit a wheel with a TA hub. Right?
You want to fit the converter axle into the 15mm TA hub. Right?
Therefore the photo with the 9mm QR axle is a red herring. We don't need to see it. Right?
If all the above gets an affirmative tick, then you simply pull the end caps off the TA hub. Those are the black caps with centre holes in the too-slow-exposure photo. They are shallow and are press-fit. Usually an O-ring or such will hold them in place. Put a long-nose pliers half inside the cap, grip nicely and pull axially. Don't let the pliers slip because it will scratch the black anodising.