This may not be the issue but I did find this information:
Over all mean temperature is most important in sex expression,
however, night temperature plays a significant role since warm nights
lead to increased male flowers production at a given temperature
compared to warm days. - https://www.agricultureinindia.net/cultivation/summer-squash/how-to-cultivate-...
You can pinch off the flower buds until you're ready to plant outside. I don't recommend changing light and heat at this point because it can make seedlings leggy and weak. How much longer do you plan to keep it indoors?