Your method is correct, but you are measuring the current amplification for the circuit as it is, but not the MAXIMUM current amplification that the transistor is capable of. And often it is the maximum that we are interested in. In this particular circuit you are pushing so much current into the base that the transistor is what we call "saturated". It is operating in that part of its transfer characteristic where there is so much current flowing through the LED and the collector that all the voltage available from the power supply is being dropped across that 470 ohm resistor and the LED. When it is operating like this, it doesn't matter how much more current you push into the base of the transistor, no more current can flow through the collector because there is no more voltage available.
In order to measure the maximum current amplification that this transistor can deliver, you would have to do one of two things, either reduce the current that you are pushing into the base, or change the collector load resistance (make it lower) so that there is some voltage left for the transistor. Since it is risky to raise the collector current too much, the safe thing to do is lower the base current. You can do this by simply raising the value of the base resistor. Raise it until you measure a collector voltage of approximately 2.5 volts. Since we often expect a typical NPN transistor to give a DC current amplification of about 100, I would expect that you need to raise the base resistance to 270Kohms or thereabouts. I hope your meter is able to measure values as low as 15 uA.
Now, having said all that, let's consider how to modify your circuit so that you can put 40 mA in and get 100 mA out. Of course, I'm curious why you want to do that because most people don't want to put that much current into the base (40 mA that is). Well, anyways, if you want to put 40 mA into the base, you would simply reduce the base resistor value to 107 ohms. To get 100 mA to flow through the LED in this case, you need only reduce the 470 ohm resistor down to about 42 ohms. That is, assuming the transistor doesn't burn out first, or the LED doesn't burn out. Or, for that matter, you might burn out that 42 ohm resistor too.