The timeframe of 1918 is a somewhat loose timeframe. The numbers come from sources that reference, "the war," and "the pandemic" which do not fit neatly into a calendar year. But the vast majority of those deaths did occur in 1918.
Regarding military deaths, the official report of the Adjutant General was checked for accuracy and amended in 1926 by Poughkeepsie’s Reuben Van Vlack, a WW1 veteran, co-founder of Poughkeepsie’s Lafayette American Legion Post, and State Historian for the American Legion. The numbers reflect this source which is generally agreed to be the best statement.
US involvement in WW1 started in 1917. That said, the vast majority of deaths were not only in 1918, but in the several months running up to the November 11, 1918 cessation of fighting. The peak and majority of flu deaths occurred in September and October 1918, but smaller waves both preceded and followed by some months.
The source for flu deaths is Southeastern New York, Vol. I, p.336. Lewis Historical Publishing, 1946. Referring to analysis by Ellen Cook, registrar of vital statistics, Poughkeepsie Board of Health. There were no estimates for outside of Poughkeepsie.