Can't move left or right with my movement script

using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
public float JumpForce;
bool isGrounded = false;
public float RightForce;
public float LeftForce;
Rigidbody2D RB;
void Awake()
{
RB = GetComponent();
}
void Update ()
{
if (Input.GetKey(KeyCode.UpArrow))
{
if(isGrounded == true)
{
RB.AddForce(Vector2.up * JumpForce);
isGrounded = false;
}
{
if (Input.GetKey(KeyCode.RightArrow))
{
if(isGrounded == true)
{
RB.AddForce(Vector2.right * RightForce);
isGrounded = false;
}
if (Input.GetKey(KeyCode.LeftArrow))
{
if(isGrounded == true)
{
RB.AddForce(Vector2.left * LeftForce);
isGrounded = false;
}
}
}
}
}
}
void OnCollisionEnter2D(Collision2D collision)
{
if(collision.gameObject.CompareTag(“ground”))
{
if(isGrounded == false)
{
isGrounded = true;
}
}
}
}

This is probably what you want, see other comments

if(isGrounded == true)
{
    if (Input.GetKey(KeyCode.UpArrow))
    {
        RB.AddForce(Vector2.up * JumpForce);
        isGrounded = false;
    }
    if (Input.GetKey(KeyCode.RightArrow))
    {
        RB.AddForce(Vector2.right * RightForce);
        isGrounded = false;
    }
    if (Input.GetKey(KeyCode.LeftArrow))
    {
        RB.AddForce(Vector2.left * LeftForce);
        isGrounded = false;
    }
}