I assume that you are asking how to take the 15.27V to 12.64V declining supply and to produce an efficient steady 12V out.
Use a proper battery box - the voltage drop you are seeing is completely unacceptable.
For testing the drop across the battery contacts form part of the load, which is OK, BUT as it obscures the battery voltage due to battery to contact voltage drops it causes measurement problems.
Your stated charging voltage of 15 Volt is too low. You need just under 18V to fully charge 12 x NimH in series. If you really only have 15V then the batteries will never fully charge and you will not get the full 2000 mAh/cell.
As you state that the starting loaded battery voltage is > 15V the charger MUST be > 15V max - measure it and determine how it changes with load.
Use a constant current load for testing. See below for details.
An LM317 and one resistor will provide this.
Check battery capacity is genuine.
Many batteries do not provide the claimed capacity.
Use a Buck converter.
A buck converter can add maybe 10 to 15% more run time after everything else is sorted out but is pointless until you fix the other major issues.
The most efficient way of converting a varying battery voltage to a lower output voltage is to use a buck converter.
BUT your figures suggest that there is "summat aglae" - something is very wrong indeed.
30 ohms load at 15V or less Vout should give 500 mA max.
2000 mAh / 500 mA = 4 hours.
Discharge rate is ` 500 mA/2000 mAh = C/4
At that level a NimH cell should be at an average of 1.15V or so and fairly flat across most of its range.
Where you measure end point of the battery depends very much where you measure the voltage. As you have such a terrible battery holder (dropping about 5V at 500 mA !!!) you should consider this part of the load and measure the voltage at the battery.
If you consider end point to be 1V/cell you should get about 4 hours down to 12V measured at the battery. As the battery contacts are interleaved with the batteries it is hard to tell which is load and which is holder loss and which is battery voltage etc.
The battery holder is a major issue - fix or replace it!
15.27 / 12 = 1.27 V/cell initial
14.39 /12 = 1.2 V/cell at 1 hour
12.64 /12 = 1.05 V/cell at 2 hours
Regardless of the reasonableness of these with time, lets look at the conversion efficiency they represent with a linear regulator.
12/15.27 = 78.6%
12/14.39 = 83.4%
12/12.64 = 94.9%
You can easily get better than 78% with a buch regulator
You can get better than 83% with only moderate care.
You can get beter than 95% only with much effort and care.
So, the start mid and end point voltages are such that a buck regulator will help.
BUT if the buck regulator gives 95% out and you would otherwise average 85% it will extend time by only about 95/85 = about 12% more.
Whereas, fixing your battery box and wiring will double the run time.
That's assuming that the batteries really are giving 2000 mAh. That's something yo need to check.
A constant current load can very easily be arranged using an LM317.
Connect an R = V/I = 1.25V/500 mA =~ 2.5 ohm resistor from Vadj to Vout.
Voltage into Vin
Output from Vadj (NOT from Vout).
Yoi now have a constant current load that allows much more consistent testing.
Note that charging 12 batteries in series will require attention to balancing. Without this you are almost certain to get imbalance problems so that one or two cells fully discharge first under load leading to early failure.
Your reported charging voltage is too low.
NimH cells need about 1.45V each to fully charge.
12 x 1.45V = 17.4V= say 18V
If your voltage source used for charging does not reach 18V open circuit then your cells are not getting a full charge.
Your reported voltage of 15V/12 = 1.25V/cell is too low.
Change this to 18V and you may get 2 x the result.
As a test, charge the batteries in a commercial charger and see what results you get.