I summarize and also add a little: in Germany, then as now, a child could receive several first names. It is generally known that the further first names in Germany do not have the meaning of a middle name in the USA and Canada. Usually the child is called with the first given name, so with Johann Diedrich this is "Johann".
It cannot be excluded that he was also called Diedrich or Dieter, and Dieter (German) and Peter (English) sound very similar. An incorrect entry in the Census is then quite possible.
It is advantageous to share the link to the Census entry, because many eyes see more than two. There is also the question if there is more than one Census entry of the family.
Interesting is the marriage certificate, because there the birth certificate is to be presented, and then the error is noticed. Also, I note that he gave his children German first names, not American.
We can only bring light into the darkness if someone finds the marriage certificate or other official documents. I myself know the Czech archives quite well, and also a little bit in the Polish ones. I have no experience in the American archives.