The four year degree referred to in the USA is usually considered a bricks and mortar degree. An online degree is not accepted.
However things they are a'changing. Due to the shortage of pilots some airlines are rethinking the whole degree thing and might accept less than the 4 year one.