It’s a little hard to tell because your code is not an MWE - none of your variables are defined anywhere, and there’s a lot of most likely irrelevant stuff in there as well. Have a look at Please read: make it easier to help you to get some ideas on how to most effectively ask for help here.
That said, you method error is (reasonably) clear I would say:
no method matching -(::LinearAlgebra.Adjoint{Float64,StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}}}, ::Float64)
It’s slightly more convoluted then it could be because your FD
(presumably) is an adjoint rather than a regular matrix, but it tells you that you can’t subtract an integer from a matrix. The error is a bit easier to digest if you have a “regular” matrix:
julia> matrix = rand(3, 3)
3×3 Matrix{Float64}:
0.936169 0.367046 0.109481
0.763018 0.0366246 0.933463
0.748903 0.128593 0.47728
julia> matrix - 1
ERROR: MethodError: no method matching -(::Matrix{Float64}, ::Int64)
For element-wise subtraction, use broadcasting with dot syntax: array .- scalar
And it even tells you what you should be doing if you are looking to subtract that scalar from every element of your matrix!