There are two ways to get promoted in the Air Guard: position vacancy and ROPMA. Position vacancy requires you be assigned to a vacant higher-graded position. Appropriate PME completed is also a defacto requirement. Once assigned to the position, your commander will need to write a letter nominating you for promotion which gets staffing through your JFHQ. You then appear before a FEDREC board (some states have you do it in person) and once approved by the board your package gets sent to NGB. You need 4 years TIG to appear in front of the FEDREC board and then it can take 6-12 months to get approval from NGB. So realistically you are looking at 5 years before pinning on O5, although your date of rank will be backdated to the date of your FEDREC board.
The other way to get promoted is ROPMA. ROPMA for O5 is 7 years TIG, so you are hitting the board 6-12 months before that. Doesn't require PME, although if your state is like mine, you will get an automatic DNP going to the board which will most likely result in you not getting promoted. If you are ROPMA promoted to O5 while in an O4 position there is a provision that you can continue to occupy the position until you have 20 years in and can retire.