It's likely a misattribution or a paraphrase of something he might have said, but it doesn't appear in any of his known works.
The sentiment of the quote is certainly in line with Wilde's known views on youth, experience, and the importance of living life to the fullest.