You are wrong. Also from wikipedia:
23 years
Death Valley Days
March 1, 1952 to August 1, 1975
558 episodes
So fewer total episodes, but broadcast for 3 seasons longer than Gunsmoke.
Gunsmoke does win for total years if you include the radio shows with Robert Conrad as Matt Dillon.
The wikipedia quote I posted was based on the number of episodes, live action, etc. I am not familiar with Death Valley Days at all.
"Gunsmoke ran for 20 seasons from 1955 to 1975, and stands as the United States' longest-running prime time, live-action drama with 635 episodes".
"In 2010, Law & Order tied Gunsmoke for most seasons for a live action drama series when it finished its twentieth and final season, but the show finished 179 episodes short of Gunsmoke's final total".
https://en.wikipedia.org/wiki/Gunsmoke