Your values are not Float64 so stop trying to force them to be. Instead just write generic statements, i.e. theta = Vector{T}(undef, length(n)), convert(T, false ? theta[i] : theta[i]).
Or better yet, you might want to follow the Bayesian Differential Equation tutorials from the Turing page: