With the creation of the ‘United States of Europe’, you are moving ‘nationalism’ from what are currently member states to nationalism on a bigger scale.
The USE will have its government, laws, police force and security forces AND its own foreign policy.
You won’t stop wars – just internally within the USE. This new country will still have its own foreign policy interest and is just as likely as any current member state to get involved in foreign wars.
Also, it is historical fact that large empires made up of people / regions who are forced to be under one flag or political system tend to have a lot of people wishing to break it up. This is more likely than anything to cause a future war within Europe. You only have to look at the former Yugoslavia as an example of what could befall this USE.