Hello
Both are correct.
"τον λόγο" is correct in modern Greek
"τον λόγον" is ancient Greek, or "katharevousa" (a formal Greek language version widely used in the 19th and 20th centuries in Greece and Cyprus by writers, newspapers and the State.)
The ancient Greek ending -ον for Accussative Singular has evolved into -o in modern Greek.
---------------------------------------------------------------------------------------------------------------------------
Vasiliki Baskou, Instructor/Director, https://learn-greek-online.com.