If it is a decent university and it is ABET accredited, and the extra money that you are paying for Purdue is substantial, than it isn’t worth it. On the other hand, if you will be paying $25,000 for your in-state, and it isn’t all that good at placing their graduates, than that extra $45,000 that you will pay for Purdue may be worthwhile as an investment. if, on the other hand, it is a decent university, and you will be paying $10,000 a year tuition, the extra $90,000 may not be worth the Purdue degree. It also depends on whether you can afford the Purdue degree without taking on a substantial debt load. If that extra $45,000 is all in loans, it is likely not worth it unless your local university isn’t ABET credited or is really poor at placing graduates. On the other hand, if your family can afford that extra $90,000, and it won’t be as debt, Purdue may still be worthwhile.
As for transferring - look at the courses required for a BS in CS, and see if how they compare to the courses you would require to finish your CE degree. The mathematics for CS are somewhat different than those for other engineering degrees. Not more difficult, per se, but different, so you may find them easier, more difficult, or the same. if the courses look like the type of material you could deal with, transfer if possible.
Have you talked to your Purdue advisor about transition to CS? Were you looking to move to CoS or staying in CoE? Have you already been accepted to the CS program?
Can your family pay Purdue tuition without hardship/loans?
Be sure to speak with advisors and career services before switching. You want to get a job you are interested in and have the aptitude for. Don’t switch purely for a higher salary.
Curious - if “it pays way more” is you primary concern, why did you select Civil Engineering in the first place? And why not go down the med-school track - that’s where you’ll earn the most.
As Purdue has a common FYE program, what does “one year for Civil Engineering” mean? Have you finished Freshman or Sophomore year?
I suspect your local university isn’t free, so the $40K number isn’t really relevant - what is the cost differential between the two? And how much longer will you need to pay it if you need to start over in a new program?
CODO into CS isn’t easy at all - have you already done this/spoken with an advisor who says it’s possible?
You’re going to be in a career for a lot longer than you’re in college. Study what you are interested in and what you will enjoy for a career. Doing something you don’t like because it pays more rarely leads to long-term satisfaction.