You didn't ruin your chances. I majored in mathematics at a school with a great reputation and got a 2.9x GPA both overall and within the major. I got a master's in statistics from a newish program that wasn't that well-renowned, but was very good for me. I did very well and was able to get into a very good PhD program.
I didn't get my act together until after undergrad and you got yours together after just 1 year. You may not get into every program, but work hard and you should be fine.