I'm no expert on the subject but sounds like maybe your dynamo is polarised wrong way around or your voltage regulator is off.
First thing I think would be to check your dynamo, remove the wires from the dynamo then connect both output tabs together with one wire and with the motor running check what voltage you get with a meter from this wire to earth ( bare metal on frame ) more important is the polarity you should get a reading with the positive lead of your meter to earth and the negative to the dynamo, If you get no reading swap the leads around and try again if you get a reading this time then your dynamo is wrong polarity
Try this then get back to us, more informed members may have better suggestions, you may need to flash the dynamo, sounds dramatic but is easy, must be I've done it