Last year, Riley lost 3 and 2 to Scottie Scheffler at Martis Camp in Truckee, California.
Zalatoris, making his record-tying fifth appearance in the event, won with a birdie on the par-5 18th after Luck won Nos. 14-16 to square the match.
"Even when he won three in a row, 14-16, and then his putt (from the fringe) should have gone in on 17 when it hit the flagstick, I just stayed patient and I knew exactly what I needed to do," Zalatoris said. "Like I've said all week, my ball-striking has held up as well as it has all year."
In the morning quarterfinals, Riley beat China's Andy Zhang 2 up, and Zalatoris topped Zimbabwe's Sean Crocker 3 and 2.
Riley and Zalatoris earned spots in the U.S. Amateur next month at Atlanta Athletic Club.