She won't lose in 2020.
The real question is what her district will look like after redistricting when she has to run again in 2022. If the NY Democratic Party wants to screw her over, that's the way they'd do it.
AOC is in luck, actually: NY-14 was drawn as a Hispanic majority district but as of last year has fallen to 47.7% Hispanic. After 2020 it'll almost certainly be restored to 50% Hispanic to avoid a VRA retrogression lawsuit.
The seat is hers for as long as she wants it
She won whites and tied with Hispanics in the primary though. But yeah, the Dems would be dumb to primary a rising star like her.