When I look carefully at the contents of the code you pasted I see two or three different ways that "prime", to indicate derivative, is shown. I am concerned that this is either a scrape-n-paste error or that you might have have fallen victim to all the available characters and fonts.
I have tried to enter all the "prime" using the same method here
n[\[Rho]] = Piecewise[{{n2, \[Rho] >= a}, {n1, \[Rho] < a}}];
Assuming[n2 < n1,
DSolve[k0^2 n[\[Rho]]^2+(F'[\[Rho]]/\[Rho]+F''[\[Rho]])/F[\[Rho]]+Z''[z]/Z[z]+ \[Phi]1''[\[Phi]]/(\[Rho]^2 \[Phi]1[\[Phi]])==0,
F[\[Rho]], \[Rho]]]
Note: It is sometimes less error prone when posting code here to have an empty line, paste the code, have another empty line, select the code with the mouse and then tap ctrl-K to put the code into a box and avoid some of the posting changes that can damage the code. That is what I did above. You can also attach a small example notebook showing exactly what your code did after a fresh start and a single evaluation of the notebook.
I'm also worried that you have three functions with derivatives, but are only solving for one of those and have given no hint what the definition of the other two might be.
If you could append a small notebook showing a complete example with a fixed n index of diffraction and follow this with an almost identical example where the only change is n no longer being a constant and instead being your step in index of diffraction then it might be possible for someone to be able to see a way to get this to work for you. Simplicity and clarity and a working example to start from is probably key.