So I would also initially keep the oil heating system, because all the alternatives are not very appealing.
But you could find out how much the gas line would cost without the neighbor's contribution. Either it's exorbitantly expensive (€10,000), or gas is a strong contender to replace oil.
Depending on the federal state, you can easily buy a new oil condensing boiler until the end of 2025. And even after that, you can continue to install a new oil heating system, provided you couple it with renewable energies. Then you would have to see the political situation regarding oil, but I would consider switching to gas sensible, especially considering the costs you save (keyword CO2 tax).
I think a heat pump for an old building without insulation and underfloor heating is not sensible at first glance, and they are also very expensive compared to oil and gas. I also personally have the prejudice that heat pumps are prone to faults, require more maintenance, and are difficult to adjust. Please correct me if I'm wrong ;)