A few questions:
- Where and how did you connect the input voltage? Am I right supposing between V- and V+?
- Did the voltage souce have any connection to ground? (This is an instrumenation amplifier, it amplifies V+-V-, but both sources need a reference to ground for the opamp input current to return to ground. if the input voltage source is floating, add a 1MΩ resistor from each input to ground)
- Were the opamps powered by a dual supply (the LM324 is not suitable for single supply operation in this circuit)?
- How did you calculate gain?
Supply the complete test setup, please, there is more than one possible source of error.
Thanks for your reply.
Please allow me to give a little more description.
The voltage I want to amplify is the output voltage of a Linear displacement sensor.

This sensor has four electrical connections, two for excitation voltage(here I use 5V DC from a power supply), two for signal output which is the voltage I want to amplify.
Here are the answers of your questions.
1. I connect two signal output of the sensor to the V- and V+ of the amplifier.
2. The sensor is excited by the following power supply. I am not sure whether or not the sensor output is floating, I will try add a 1Mohm resistor and test again.

3. The opamp was power by +12V and -12V.
4. I calculate the gain using the following equation.
Vout/(R1+R2+R3+R4) = (V+ - V-)/(R2+R3)