The damnation of those who "do not love Jesus" that abruptly ends First Corinthians has an immediate context in the opening thought of Galatians. Those who preach a different gospel are also damned.
To my knowlege none of the translations currently in the scripture quote boxes use the same word in both scriptures. Some say cursed, or accursed or condemned or damned. In the Aramaic New Testament the word "khram" (which is usually translated "damned") is used both in First Corinthians 16:22 and Galatians 1:8 and 9. It's nice to know that in the original language the same word is in play across this context.
By way of application we could assert preaching a false gospel has at it's root the problem of not genuinely loving Jesus.