That depended on having propulsive landing for Dragons, because Mars doesn't have oceans or much atmosphere. They thought they could develop propulsive landing for Dragons the same way they did for Falcon 9, by using paid-for customer flights. Specifically, cargo return trips from ISS, paid for by NASA. What changed is that NASA (quite reasonably) refused to let SpaceX risk their down-cargo. For SpaceX to test propulsive Dragons on their own dime would have been expensive. So it got cancelled, in favour of going all-in on Starship. One of SpaceX virtues is their willingness to change their plans when necessary.
Starship landing on Mars in 2027 was plausible when the first propellant transfer tests were happening 2Q 2025, which itself was plausible in 4Q 2024. Now the setbacks with V2 Starship are making it look much less likely. The orbital propellant transfer tests may not happen until next year now, and of course they need to land Starship on Earth before attempting it on Mars. I still wouldn't rule it out. They'll surely pull out all the stops to avoid losing the 2-year transit window.