Basically, you're going to have to kill Napoleon in some way before the Treaty of Tilsit and the Continental System was put in. Napoleon trying to dictate to all of Europe and just making mistake after mistake made conflict inevitable. Maybe Napoleon dying before the outbreak of the Coalition in 1805 prevents France from provoking them into going with the UK and a general peace settles for the time being.
Or have him go away into exile but with a permanent possibility that he (or someone like him) might come back.
That was pretty close to what happened OTL, save that the departure was involuntary, and it preserved the peace for nearly half a century.