I am unclear as to the elements of cost attributed to solar making it cheaper.
Solar, if only the panels and the costs associated with attachment of the panels is being considered, then I agree the cost to set up a solar power generating system is inexpensive. But that is only a small part of the computation.
If you are going to produce some electricity, and you want to figure out the cost, you are going to add up some numbers:
1) What does the equipment cost?
2) How long will it last?
3) What are maintenance costs?
4) What other costs are involved in producing electricity (i.e. fuel)?
Of course, if you really want to get granular, you could estimate other costs such as what your time is worth and lost productivity costs, etc. if there are service disruptions. I'm not sure this would be an easy comparison because a) you don't need to take solar offline for maintenance except rarely, but b) you can run diesel at night. There are pros and cons in these margins.
But, we are just talking about how much does it cost to produce a kWh when you spread out all associated costs over a long period (often the useful life of the original equipment).
(I know I'm not telling you something you don't know - just walking you through my reasoning.)
I do not think that the case could be made that diesel is cheaper than solar by looking at those numbers except possibly in some fairly narrow circumstances and by narrowing the way you do the comparison.
For example, a diesel generator is capable of greater output for a given footprint. To match that with solar, you need a lot of panels. And, you might need to match that with considerable battery storage. But, we are no longer comparing production cost apples-to-apples, at that point. Now we are getting into usage profiles. In other words, that takes us into the realm of talking about whether a person can make one option or the other work more advantageously for their specific usage profile. That is a different discussion.