Your Preview struct is inside your ContentView struct. It should be below it. Check all the curly braces and make sure that you have matching pairs in the right places.
As for the code inside the ContentView struct, it looks fine to me. Maybe clean the project build folder. You can do that quickly using the keyboard combination Shift + Command + K