The profession is definitely transforming, but it's not disappearing. Self-checkout and automated machines are taking over retail - that's a fact. But at the same time, there's growing demand for people who work with payment systems, train staff on new registers, analyze payment data, and help customers with technical issues. If you're willing to do more than just stand behind a register and develop skills in technical support or operations management, then there are definitely prospects in that direction.
The company didn't offer retraining just for nothing - often in these situations they help tried-and-tested employees switch roles. Maybe it's worth finding out which positions they're willing to move you into and what the salaries are like in those roles? Sometimes that turns out to be a better deal than starting from scratch somewhere else.
But the decision depends on what motivates you. If you enjoy working with people and want to stay in retail, you could think about moving into a consultant role, store supervisor, or department manager position. If your accumulated experience feels wasted, you could take a risk and try a completely different field. Eight years of experience is serious, and employers usually value responsible people like that in any industry.