It seems that the aphorism has an English origin: Shoot for the moon, even if you miss, you’ll land among the stars. But it is not clear whether it is from Oscar Wilde. Many sources attribute it to Norman Vincent Peale. Quote from Wikipedia:
Norman Vincent Peale (May 31, 1898 – December 24, 1993) was an American minister and author who is best known for his work in popularizing the concept of positive thinking, especially through his best-selling book "The Power of Positive Thinking". He served as the pastor of Marble Collegiate Church, New York, from 1932 until 1984, leading a Reformed Church in America congregation.
Peale was a personal friend of President Richard Nixon and he influenced other US presidents as well.
His ideas and techniques received criticism from church figures and from psychiatric professionals.
A book with the "The Power of Positive Thinking" seems to be a good candidate to contain your aphorism. Of course the author may have quoted Oscar Wilde, but I doubt it.
The aphorism sounds very nice, but Peale's philosophy also has a "dark side". Let me quote from here:
"Das Opfer eines Minderwertigkeitskomplexes sieht alle Fakten durch die Brille der schwarz-weißen Einstellung. Das Geheimnis der Korrektur dieser Einstellung besteht einfach darin, dass man eine normale Sichtweise annimmt, und das bedeutet, dass man sich immer der positiven Seite zuneigt." NORMAN VINCENT PEALE
Dabei zitiert er Menninger: "Einstellungen sind wichtiger als Fakten."
Doesn't this resemble alternative facts?
Anyway, the origin of the aphorism is irrelevant, you asked for a German translation. Here are two suggestions:
Versuche stets den Mond zu erreichen - auch wenn es Dir nicht gelingt, wirst Du bei den Sternen ankommen.
Setze Dir große Ziele - und Du wirst immer etwas Wunderbares erreichen.
Michael Kay comments that the quote is also attributed to W. Clement Stone. As Peale he was a proponent of a "positive mental attitude" to be successful in life. For the quote see here. I did again some "Google research" and found that variants of the quote have been attributed to many people. See here:
„Shoot for the moon. Even if you miss, you'll land among the stars.“ — Norman Vincent Peale
„Shoot for the moon, even if you fail, you'll land among the stars“ — Cecelia Ahern Irish novelist 1981 Quelle: P.S. I Love You
„Shoot for the moon, because even if you miss, you'll land in the stars.“ — Les Brown American politician 1945
„Reach for the stars and even if you miss you will land among the stars“ — Wendy Mass American children's writer 1967 Quelle: Jeremy Finl & the Meaning of Life
„If you shoot for the stars, you'll at least hit the moon“ — T. Harv Eker American writer 1954 Quelle: Secrets of the Millionaire Mind: Mastering the Inner Game of Wealth
„Aim for the moon. If you miss, you may hit a star.“ — W. Clement Stone American New Thought author 1902 - 2002 As quoted in The Power of Choice (2007) by Joyce Guccione, p. 199 also attributed to Oscar Wilde (1854–1900) and Les Brown (1912–2001) Misattributed
Also look at this to find even more similar quotes. It is remarkable that 3. occurs in the alternative form „It is better to aim high and miss than to aim low and hit.“
Therefore I believe that we cannot really identify the creator of the aphorism. I think it has been circulating for a very long time and many people used it, perhaps not consciously knowing that they have heard it somewhere before.
The whole thing reminds me of a question concerning a quote attributed to Otto von Bismarck; see What is the original German version of Bismarck's phrase about intentions and capabilities?
It is not clear whether he ever said it, but is nevertheless popular in Russia (though not in Germany).
Let me close by quoting Giordano Bruno:
Se non è vero, è molto ben trovato. (If it is not true it is very well invented.)
I hope this does not apply to itself.