Do I need a junction box for a hardwired stove?
You will need to refer to the documentation that came with your new appliance.  Is it rated to be connected with a cord an plug or directly wired?  

To start with you will need to run a new cable of 10 gauge wire and replace the circuit breaker in your panel.  Operating the appliance with 12 gauge wire when it is rated more than 20 amps and requires 10 gauge wire violates the manufacturers instructions as well as overloading the circuit.