I don’t know. The other initializer @QuinceyMorris pointed at should have made it valid.
In general, because so many types are expressible as literals, combining lots of them into a single expression can cause the compiler to a have lot of options to rule out. Often breaking it up as the error suggests can lead to a clearer message, then when you know what the real problem is you can sometimes put it back:
let a = Text(String(Double(y)/4.0))
let b = a.position(x: geometry.size.width/2, y: CGFloat(y))
let c = b.font(.system(size: 8.0))
let d = c.foregroundColor(.gray)
return d