Find the maximum of a multivariable (arbitrary) function

Does anyone know of some helpful functions in a stats package somewhere that can help me solve the following optimization problem?

So, I have 2 datasets, DVH1 and DVH2.
I also have a function, NTCP, this is a known function with some adjustable parameters (contained in the vector a), and an argument (DVH)

and I want to find parameters (a) that maximize the following logliklihood Screenshot from 2020-02-13 14-32-47
I will have some initial guess of the parameters in a.

Where i is over the dataset DVH1 and j is over the dataset DVH2.
I know of some functions called loglikihood in the Distributions.jl package, but I am not sure how to use this to solve my problem. Is there a function in Stats or Distributions or some other package that allows me to find a local maximum of logliklihood for any arbitrary function given some parameters to fit?

Note: I hope I am being clear enough but happy to elaborate further on my specific problem. It is outlined in this paper: https://www.sciencedirect.com/science/article/pii/S0360301611005244?via%3Dihub , equation 8, for those of you with elsevier access.

Thanks,

I usually use the following packages for optimization: