current mirror circuit using BJT is alternative for LM317 current source?
It will have defects, and it will work very well. It depends what your specifications are. There is much literature available on the design of current mirrors.

The main problems of discrete current mirrors, compared to monolithic implementations, as you hint at in your question, are the unequal current density if you use them at a ratio other than 1, and temperature difference between the devices.

Usually, discrete current mirrors are designed for a much larger voltage drop in the emitter resistor than are monolithic, usually 1 volt is sufficient, though more improves the specifiations. This extra voltage drop swamps the Vbe differences that current density and temperature will create. Often, the emitter resistors may be omitted entirely in monolithic implementations.

Amongst the improvements to look out for when reading the literature - check the lead configuration of the 'diode connected' transistor - you can improve the output impedance by using a cascode configuration - you can improve the accuracy and thermal stability by using an op-amp to servo current in the emitter resistor of the output device - you can make it cheaper at the cost of transfer ratio accuracy by using a diode, instead of a diode-connected transistor