The task is changing; the job is not disappearing. Here's the grounded view:
What AI already does well: boilerplate, standard CRUD, translating clear specs into code, tests, refactors. The 'typing part' of programming is genuinely commoditizing.
What it doesn't do: figure out what to build, negotiate ambiguous requirements with humans, own a system in production, make architectural trade-offs against business constraints, debug the weird interaction between three systems written by teams who left. That's most of what senior engineers are actually paid for.
History rhymes: compilers, frameworks and Stack Overflow each 'ended programming' by making one layer trivial — and demand for engineers grew every time, because cheaper software means more software gets built.
Your move as a student: use AI aggressively, but make sure YOU can architect, debug and reason about systems. The people at risk are those whose entire value is typing code from tickets.